QuestenaPractice that shows what to review next
Question 76

The arrow function pick is written as a => a. What happens when pick(4, 9) is evaluated?

  1. It returns 9 because the last argument wins
  2. It returns an array containing 4 and 9
  3. It throws an arity error before the body runs
  4. It returns 4 and the extra argument does not block the callCorrect answer

Explanation

The call is valid even though it supplies more arguments than pick has named parameters. The parameter a receives 4 and the expression returns it; JavaScript does not enforce an exact argument count for an ordinary call.

Continue with this test

Start practice
Question 76: The arrow function pick is written as a => a. What happens… · JavaScript Fundamentals · Questena