Guest practice: this set is not saved and does not count.
What does this log?
function findMax() { let max = -Infinity; for (let i = 0; i < arguments.length; i++) { if (arguments[i] > max) { max = arguments[i]; } } return max; } console.log(findMax());
function makeAdder(n) { return function (x) { return x + n; }; } const addFive = makeAdder(5); console.log(addFive(10), makeAdder(1)(1));
const f = (x, y) => { x * y }; console.log(f(3, 4));
Which of these arrow functions is written correctly?
const add = => a + b;
const add = (a, b) => a + b;
const add = (a, b) => return a + b;
const add = a, b => a + b;
In what order are these logged?
console.log("A"); setTimeout(() => console.log("B"), 100); setTimeout(() => console.log("C"), 0); console.log("D");
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