JavaScript: final assessment

This covers the whole course. Take it after the last module.

Final quiz

1. Which of these is NOT a falsy value?
2. Why should you prefer === to ==?
3. What is the value of [1, 2, 3].includes("2")?
4. What does ["10", "9"].map(Number).sort((a, b) => a - b) give?
5. const a = { n: [1] }; const b = { ...a }; b.n.push(2); what is a.n.length?
6. What is typeof null?
7. Inside a regular method called as obj.go(), what is this?
8. Which line creates a private field in a class?
9. What happens to a let variable when its block ends and no closure uses it?
10. An async function does throw new Error("x"). What does its caller receive?
11. A try block contains await p, and p rejects. What happens?
12. Why might loading images one at a time with await in a loop be slow?
13. A module has export default function f() and export const g = 1. Which import is right?
14. Which call gets all the elements with the class item?
15. A link's click handler must stop the browser going to the link. What should it call?
16. A click on a span inside a list item reaches a listener on the ul. What is event.target?
17. What should you do with the result of localStorage.getItem before using it as an object?
18. A form's checks all run in the browser. Is that enough to trust the data on a server?

Practical assessment: Build a searchable contact list

Without using hints, write a page holding a list of contacts as an array of objects, with a search box that filters the list as the person types and a form that adds a new contact.

Final project

An expense tracker: Build a page where a person can record spending, see totals for each category, delete mistakes, and find everything still there when they come back.

How it is evaluated

To complete this course