JavaScript Developer — Hard
Key points
- The rest parameter `...rest` gathers all remaining elements into an object.
- The output is an array `[3,4,5]` because `rest` contains the remaining elements.
- The type of `rest` is 'object' due to the rest parameter behavior.
Ready to go further?
Related questions
