Day 5: Advanced Topics QUESTION 1: Write a program that demonstrates the use of closures by creating a function that increments a counter variable. QUESTION 2: Write an example of a JavaScript Promise to simulate a delay using setTimeout. QUESTION 3: Create a program that uses the fetch API to retrieve data from a JSON placeholder API and display it on the webpage. QUESTION 4: Write a program to demonstrate the difference between call, apply, and bind methods in JavaScript. QUESTION 5: Create a class in JavaScript with a constructor and a method. Instantiate the class and call its method. QUESTION 6: Write a program to convert a JavaScript object into a JSON string using JSON.stringify(). Then parse the JSON string back into an object using JSON.parse(). QUESTION 7: Fetch data from a public API (e.g., JSONPlaceholder API) and display the data (like titles or names) on the webpage in a list format. QUESTION 8: Create a program that saves user input into a JSON object and logs it in the console when the user submits a form. QUESTION 9: Write a program to merge two JSON arrays into one using the spread operator and log the merged array.