O'Reilly logo

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond by JD Isaacks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unit 3. Functions

Functions are a pretty fundamental construct for authoring applications. This is especially true in a language like JavaScript, which treats functions as first-class citizens. With ES2015 and later, many awesome features have been added to functions, including several completely new types of functions.

We’ll start the unit by taking a look at default parameters and rest. I think most programmers, at some point, have had the need for default parameters and likely worked around it by checking for a value and assigning one if undefined at the start of the function. The rest param is even more useful. Anyone who has used the arguments object before will be happy to use rest. Not only does rest render the arguments object obsolete, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required