# Week 5 - Iterators, Generators, Maps, Sets, iPhone-X
# Iterators and Generators
Objects that have a specific order to their properties are said to be iterable. An Array is iterable. It's elements are numbered. A plain Object that you create yourself like this:
let obj = { a: 1, b: 2, c: 3, d: 4 };
It is not iterable. Those properties could exist in any order without changing the object in any way. With that object we can use a for...in
loop, but not a for...of
loop. for...of
loops require iterable objects.
When you need to iterate through an Object
we can create our own custom iterators.
When you want to iterate through any iterable object in an asynchronous way, with a simplified syntax, then we can use a generator
function.
Learn about Iterables, Iterators, and Generators
# Maps and Sets
There are two types of Objects that are closely related to the Object
and Array
types in JavaScript. Maps
are like a carefully structured Object
. Sets
are like managed Arrays
with no duplicate values.
Learn more about Maps and Sets
# Designing for iPhone-X
With iPhone X came the dreaded notch at the top of the screen that interferes with content and how CSS renders.
Learn how to cope with the notch in your CSS
TODO
- Read the content and watch the videos for Weeks 5 and 6
- Prepare for the third timed exercise
- Finish and submit Cordova ReviewR project