1. Write an HTML file that includes a JavaScript class named Car with the following features:
i) A constructor that takes a parameter name and assigns it to a property called brand.
ii) A method showBrand() that returns a string in the format: "Brand is [brand]".
Create an instance of the Car class with the brand "Ford" and display the output of the showBrand() method on the webpage using document.write().

2 Write a React program that maps over an array ['apple', 'banana', 'orange'] and renders each item inside a <p> element. Mount the result to the DOM and render it.

3 Convert this normal function into an arrow function:
hello = function() { return "Hello World!"; }

4 Write a React component called Goal that takes a prop isGoal. If isGoal is true, it should render <h1>GOAL!</h1>, otherwise, it should render <h1>MISSED!</h1>. Mount the component to the DOM and pass isGoal={false} as a prop.

5 Create a React component called FavoriteColor that initializes a state variable color with the value "red". Display the current color inside an <h1> element and include a button that updates the color to "blue" when clicked. Use the useState hook for state management and render the component inside the root element using ReactDOM.

6 Write an HTML document that includes a JavaScript class named Car. The class should have a constructor that takes a parameter name and assigns it to a property called brand. Then, create an instance of the Car class with the brand name "Ford" and display the brand name on the webpage using document.write().

7 Write an HTML page with a JavaScript script that defines a Car class with a constructor accepting a brand name and a method showBrand() that returns the brand. Then, create a Model class that extends Car, adding a model name and a method showModel() that returns both the brand and model. Finally, create an instance of Model and display the output on the page.

8 Write a React code containing a React component named Football that renders a button. When the button is clicked, it should call a function shoot() that takes a parameter and displays an alert with the passed value. Use an arrow function inside the onClick event handler to pass the string 'Goal!' to shoot(). Finally, render the Football component inside the root element of the React application.

9 Write an HTML file with a button (id="btn") that changes the text of a paragraph (id="demo") from "Old" to "New" when clicked, a "Header" class with a changeText() method to update the paragraph text and an event listener that triggers changeText() on button click.

10 Write a React program that renders an <h1> element displaying the text "React is 10 times better with JSX", where 10 is the result of {5 + 5} inside JSX. Mount it to the DOM using ReactDOM.createRoot.

11 Convert this arrow function into a normal function:
hello = () => { return "Hello World!"; }

12 Write a React component Message that uses the ternary operator to display "Welcome back, user!" if isLoggedIn is true, otherwise "Please log in to continue." and render it with isLoggedIn={true}.

13 Write an HTML and JavaScript program that defines a Car class with a constructor that takes a car brand as an argument. Create an object of this class with the brand name "Ford" and display the brand name on the webpage using document.write().

14 Write a React program that initializes a variable x with the value 5 and uses JSX to conditionally render an <h1> element displaying 'True' if x is greater than 10, otherwise displaying 'False'. Make sure to use ReactDOM to render the element inside an HTML element with the ID 'root'.

15 Write a React code containing a React class component named Car that renders a heading saying 'I am a Car!' and another class component named Garage that renders a heading ‘I’m a Garage' and includes the Car component inside it. Assume that there is an index.html with a div element with ID as "root".

16 Write an HTML page with a JavaScript function calculate(a, b) that takes two numbers as arguments and returns an array containing their sum, difference, product, and quotient. Use ES6 destructuring to store the returned values in separate variables and display them on the webpage.