3 ms·
Technically, the spread operator works with iterables [1]. If you wanted to spread an object `obj`you'd need to define `obj[Symbol.iterator]` [2]. [1] https://
by cmpb 11y ago
Technically, the spread operator works with iterables [1]. If you wanted to spread an object `obj`you'd need to define `obj[Symbol.iterator]` [2].
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...