Learn about using default parameters to assign values to arguments when they aren't passed to a function.
Default function parameters in ES6…help out with this type of scenario…by enabling you to declare a default value for an argument…when none is supplied at call time.…Let's look at an example…of how we would handle this in ES5.…Here's a function that takes three arguments.…In the function body, it checks whether there was…any value passed for height or time,…and assigns a default if either is false.…Default parameters in ES6…enable us to move this functionality…
- Using arrow functions
- Using default parameters
- Reviewing the class structure in ES6
- Assigning variables with let and const
- Array destructuring and object destructuring
- Replacing callbacks with promises
- Keeping values unique with Set
- Dropping the prototype with Map
- Working with generators
- Using yield with arguments
Skill Level Intermediate
Building a Website with Node.js and Express.jswith Ray Villalobos3h 16m Intermediate
Node.js: Test-Driven Developmentwith Alexander Zanfir33m 17s Intermediate
Learning NPM the Node Package Managerwith Ray Villalobos35m 14s Intermediate
Building a Web Interface with React.jswith Ray Villalobos1h 21m Intermediate
3. Promises and Collections
4. Iterators and Generators
Next steps1m 41s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.