Join Eve Porcello for an in-depth discussion in this video Iterators, part of Learning ECMAScript 6.
- [Instructor] Processing each of the items…in a collection is a very common programming task.…When you are learning any language,…you're probably going to learn iteration…on the first day pretty much.…For loops, while loops, a little bit later…you might learn the map function in JavaScript.…So iteration in nothing new, but the ability…to examine, define, and customize iteration…behavior is new with ES6.…With ES6 we have two new protocols to take advantage of.…
The iterable protocol which allows JavaScript objects…to define or customize their own iteration behavior…and the iterator protocol, a standard way…to produce a sequence of values from a collection.…An object is an iterator when it understands…how to access each item in a collection.…It also keeps track of where it is currently…positioned in the collection.…Let's try to examine the iteration behavior of a string.…As I mentioned in a previous video,…the string is iterable.…
So let's go ahead and create a title…and we'll set it to ES6.…So ES6 and we will console log, the type of title.…
Author
Updated
10/6/2017Released
1/5/2016- What is ECMAScript?
- Transpiling ECMAScript with Babel and Babel-node
- Using the let and const keywords
- Creating strings with template strings
- Enhancing object literals
- Working with ES6 classes and class inheritance
Skill Level Beginner
Duration
Views
Q: The Babel API is out of date. How do I proceed with the course?
A: We are updating the course. In the meantime, you can install the babel-cli package and then install the presets that you need to follow along with the tutorials.
Related Courses
-
Building a Polling App with Socket IO and React.js
with Alex Banks3h 56m Intermediate
-
Introduction
-
Welcome47s
-
-
1. What Is ECMAScript 6 (ES6)?
-
What is ECMAScript 6?1m 29s
-
ES6 browser support1m 14s
-
Using ES6 now1m 6s
-
-
2. Transpiling ES6
-
In-browser Babel transpiling2m 25s
-
Transpiling with webpack6m 23s
-
Migrating to webpack 35m 47s
-
3. ES6 Syntax
-
Let keyword5m 47s
-
Const keyword3m 8s
-
Template strings5m 9s
-
Spread operators2m 17s
-
Maps5m 9s
-
Sets4m 24s
-
The for...of loop4m 37s
-
-
4. ES6 Functions & Objects
-
Default function parameters2m 44s
-
Enhancing object literals4m 27s
-
Arrow functions1m 56s
-
Destructuring assignment6m 22s
-
Generators6m 59s
-
Symbols3m 39s
-
Iterators6m 32s
-
-
5. Asynchronous Features
-
Intro to promises6m 39s
-
Building promises4m 17s
-
Loading data with fetch5m 15s
-
Async and await4m 28s
-
Async with fetch4m 48s
-
-
6. ES6 Classes
-
ES6 class syntax2m 37s
-
Class inheritance2m 9s
-
Getters and setters4m 52s
-
-
Conclusion
-
Next steps38s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Iterators