0% found this document useful (0 votes)
10 views3 pages

React.js and JavaScript Coding Guide

Uploaded by

daanial d
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

React.js and JavaScript Coding Guide

Uploaded by

daanial d
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1. What are the features of React.

js

2. Compare and contrast ES5 and ES6 in terms of variables, functions, and
scoping.
3. Create simple navigation bar using HTML and CSS.

4. Create a simple HTML stactic page(include HTML5 tags)


Audio,video, aside,article, header,footer,nav,

5. Convert a JavaScript object { name: "John", age: 25 } into JSON string and
back into an object using [Link]() and [Link]().

6. Write a program that declares a variable using var inside a block and logs
it outside the block. Then repeat using let and explain the difference.
7. Differentiate between var and let in ES6. Provide examples.
8. Use forEach() to print all elements of an array with their index numbers.
9. Demonstrate the difference between for...in and for...of loops with arrays
[Link] an array [1, 2, 3, 4], use map() to create a new array [2, 4, 6, 8].
[Link] an array [5, 10, 15, 20, 25], use filter() to return only the numbers
greater than 15.
[Link] a callback function example using setTimeout() that prints "Hello
after 3 seconds".
[Link] a JS code to validate an email id entered by the user in input field.
Display “Valid” in green color and “Invalid” in red color. (use button click
event).
[Link] a Javascript code to sort array elements and display them on a web
page.
15. Differentiate between XML and JSON.
[Link] code to validate a form where the user must enter a name (non-
empty) and an age (greater than 18) before submission.

17.
[Link] the code using HTML and JavaScript, which will display alert box
with the message "Please enter a pass phrase" When clicked on "ok"
button, the code should check whether the password entered by the user
contains characters a-z and numbers 0-9. If so it should print the message
"password containing valid characters". If any special character is present
in the password, it should print the message "invalid password"
[Link] following CSS properties with example 1. Inline-block 2. Display
3. Position 4. Lists 5. Padding
[Link] a form in HTML where an input will be taken from user as a string
with a text box. Write a code in Java script to capitalize the first letter of
the above string and display that output to the user on same page.
21. Justify why Semantic elements are preferred over element in HTML.
[Link] an HTML, CSS, and JavaScript program to create a webpage with a
<div> element containing the text "I CAN MOVE". The page should also
contain a button labeled Start Animation.
When the button is clicked, the <div> should gradually move to the right
until it reaches a left position of 250px, and then stop.
[Link] a program that changes an image when the mouse hovers over it and
reverts back when the mouse leaves.
[Link] a program that reads data from an array ["Apple", "Banana",
"Mango"] and dynamically generates a list in HTML.
[Link] 3 important features introduced in ES6.
[Link] the function function add(a, b) { return a + b; } as an arrow
function.
[Link] different attributes for layout and positioning of contents on a web
page.
[Link] the code to create the content with the alert box as shown below. The
background color of the alert box should be blue. The alert box needs to be
closed by clicking on the “x” symbol.
29. Write a function sum(...nums) that calculates the sum of any number of
arguments passed to it.
30. Combine two objects {a:1, b:2} and {c:3, d:4} into a single object using
the spread operator.

You might also like