Home
My Highlights
Discover
Sign up
Rest parameters and spread syntax
javascript.info
There is also a special array-like object named arguments that contains all arguments by their index. But the downside is that although arguments is both array-like and iterable When ...arr is used in the function call, it “expands” an iterable object arr into the list of arguments. The spread synta
5 Users
0 Comments
35 Highlights
0 Notes
Top Highlights
There is also a special array-like object named arguments that contains all arguments by their index.
But the downside is that although arguments is both array-like and iterable
When ...arr is used in the function call, it “expands” an iterable object arr into the list of arguments.
The spread syntax internally uses iterators to gather elements, the same way as for..of does.
Array.from operates on both array-likes and iterables. The spread syntax works only with iterables.
Tags
rest
Javascript
Domain
javascript.info
Ready to highlight and find good content?
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.
Start Highlighting