// Practice Set · JS Functions (Part 2) · guest

Guest practice: this set is not saved and does not count.

Question 1 of 5 from: Function Arguments

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());
Question 2 of 5 from: Function Expressions

What does this log?

function makeAdder(n) {
  return function (x) {
    return x + n;
  };
}
const addFive = makeAdder(5);
console.log(addFive(10), makeAdder(1)(1));
Question 3 of 5 from: Function Arrow

What does this log?

const f = (x, y) => { x * y };
console.log(f(3, 4));
Question 4 of 5 from: Function Arrow

Which of these arrow functions is written correctly?

Question 5 of 5 from: JS Timers

In what order are these logged?

console.log("A");
setTimeout(() => console.log("B"), 100);
setTimeout(() => console.log("C"), 0);
console.log("D");
Ready to submit?

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.