Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CS601 Final Examination

Instructions: Answer all questions as best you can. Partial credit can be awarded at the sole discretion of your Professor. There is no T/A for this class. Your Professor, Andrew Sheehan, will be reviewing your answers/solutions. If you have questions during the exam time frame, email [email protected]. I will not have a Zoom meeting for the duration of the final exam.

1. This question is worth 10 points

Demonstrate how you properly define and use Set and Map by adding 1 element to each (1 to the Map and 1 to the Set) one then show how you delete from each one.

2. This question is worth 10 points.

Using the fetch API, show how you do a GET request of the data at https://jsonplaceholder.typicode.com/todos/10. Show all the data that comes back in the response in a ordered list in your page.

3. This question is worth 10 points.

Create a HTML form with 3 } elds (textarea, textfield and a date selector). Show how you would validate each field when the form is being submitted using the correct event handler and javascript function(s). If any field fails your validations, the form will not submit and it will show an error message.

4. This question is worth 10 points.

Create a page that uses media queries. If the page width is less that 900px, then have all the font sizes be at 10px, otherwise the stadard page font size is 14px. If the page is printed, then hide all/any image in the page.

5. This question is worth 10 points.

Write an example of how hoisting happens. Just write enough javascrpt that shows what hoisting is. You can add comments into your code that help describe what is going on (that proves or shows that hoisting is going on with your code).

6. This question is worth 10 points.

Write an example that demonstrates what closures are. Just write enough javascript that proves your understanding.

7. This question is worth 10 points.

If you have an array with 10 values, like this:

10,78, 121, 454,3,a, &67, 18b, 9-, OO8

Using the correct array API (one of the built-in API array methods), show how you would get only those values over 100 back from your function call after clicking a button in the page to start it.

8. This question is worth 10 points.

Given this XML fragment below, show how you get only the name of the book into a div when you click a button on your page to start it.

<books> <book> <name>This is your life. Enjoy it.Donald Trump</author> </book>

<book> <name>The art and zen of hamburgersFrank Beans</author> </book>

</books>

9. This question is worth 10 points.

Create a module with 2 functions exported. Have an HTML page use those functions in your page.

The 2 exported functions are sayHi() - returns "Hi". And sayBye() - returns "Bye"

10. This question is worth 10 points.

Write an example of using Promises in one HTML file and then in another file, show those same promises using async and await.