Guest practice: this set is not saved and does not count.
What does this log?
function visit() { let count = 0; count++; return count; } visit(); visit(); console.log(visit());
function makeCounter() { let n = 0; return () => ++n; } const a = makeCounter(); const b = makeCounter(); a(); a(); console.log(a(), b());
Which statement about declaring the same name twice in one scope is true?
let
var
const
What happens when this runs?
"use strict"; const settings = Object.freeze({ theme: "dark" }); settings.theme = "light"; console.log(settings.theme);
dark
undefined
TypeError
light
Putting "use strict"; on the second line of a function, after another statement, still turns strict mode on for that function.
"use strict";
Click a question to go back and check it. After you submit, you will see the right answer and an explanation for every question. As a guest, nothing is saved.
Check my answers