Learn about for...of, a new way to iterate through certain collections that reduces a lot of the boilerplate required by for...in.
For of is a new built-in that can be used…with iterable types like arrays, maps, and sets,…but not for objects.…At each loop, a variable is assigned to the…current element in a collection.…This is much easier than for in…where an index is set to the variable…and then used to reference an actual element…of the collection.…Let's see for of in action in our demo project.…Open up dataStore.js in out lib folder…and on line 42, we're iterating through…a pizzas array using forEach.…
- 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?
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.