QuestenaUn entraînement qui indique quoi revoir ensuite
Question 80

A function signature ends with ...rest. Which statement about rest is accurate?

  1. It may be followed by any number of ordinary parameters
  2. It stores only the count of remaining arguments
  3. It always creates an Array containing one nested Array
  4. It gathers remaining argument values into an Array and must be finalBonne réponse

Explication

A rest parameter must be the final parameter and gathers the remaining argument values into an Array. It does not wrap all remaining values into an extra nested array unless one of those values was itself an array argument.

Continuer avec ce test

Commencer l’entraînement
Question 80: A function signature ends with ...rest. Which statement… · JavaScript Fundamentals · Questena