December 2017
Beginner
372 pages
10h 32m
English
Similar to JavaScript, TypeScript also provides the data types that have iteratable properties in them. In fact, they are the same data types, that is, arrays, string, maps, and sets, in TypeScript as well. If we look at the definition of a string or an array in TypeScript, we will see the Symbol.Iterator property defined in them, as shown in the following screenshot in the case of an array:

The Array interface has a Symbol.iterator property of the IterableIterator interface. This IterableIterator interface implements an iterator interface with three methods: next, return, and throw. As you can see in lines number ...
Read now
Unlock full access