Learn how to declare function properties on objects without using the function keyword.
- [Instructor] Variables aren't the only object property…that receive a shorter syntax with ES6.…Function properties can also now benefit…from this shortened syntax.…With ES5, declaring a function property on an object…looks like this, declaring the key,…then assigning a function as the value.…While this isn't really that verbose,…the new function property syntax in ES6…removes the colon in the function keyword…leaving you just the property identifier…and an argument set in parentheses…which signifies that the property is actually a function.…
This doesn't remove that much boilerplate,…but the function keyword is really unnecessary…since the parentheses identify the property…as a function by itself.…Computed property names,…like the ones we introduced in the last video,…also work with function property declarations.…Here's an example of using a computed property name…to combine a string and a variable to create a…unique property name for a function.…You can see the colon and function keyword…are still unneeded and the identifier simply uses…
- 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 13s Intermediate
Learning NPM the Node Package Managerwith Ray Villalobos35m 10s 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.