Wrapping Up
The rest parameter is a good replacement for arguments—just as powerful minus the perils. The same symbol (...) when used on the calling side becomes the spread operator. In addition to these two additions related to function parameters/arguments, JavaScript now has the ability to assign default values to parameters. This last feature especially is very useful to extend existing functions for adding new parameters. In the next chapter, we will look at nice ways to iterate over collections of data.
Exercises
This chapter covered some significant ground and touched on many useful features in JavaScript. Before you move on to the next chapter, spend some time on these practice exercises as a way to review what you have learned in this ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access