3New Function Features
In this chapter you'll learn about many of the exciting new features of functions in modern JavaScript, such as arrow functions, a lightweight, concise new form of function that solves an entire class of issues with callbacks; default parameter values for simplifying function code and improving support for tools; rest parameters providing true arrays of the “rest” of the arguments to a function after the named ones; the newly official
name
property on functions and the many and varied ways it gets set; and how function declarations within flow-control blocks work.
There are three function-related things we defer to later chapters:
Get JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.