Question Bank

JavaScript Spread Operator Refactor: Two Explanations Quiz

Difficulty: Easy

Refactor a manual `sum(nums[0], nums[1], nums[2])` call with the spread operator, two equivalent shapes (spread shortcut and the older `apply(null, nums)` form), plus companions on rest parameters and array-spread vs concat.