Explore JS
🏠 cheatsheet
  • Arrow Functions
  • Template Literals
  • Iteration
  • Object Literals
  • Destructuring
  • Spread, Rest
  • Map, Filter, Reduce
  • Array, Object Methods
  • Map, Set Constructors

Iteration

keep in mind...

  1. for/of loops are not for objects!
  2. use break to stop the loop
  3. now possible to create custom iterators

Research More...

  1. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration
  2. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of
  3. https://hacks.mozilla.org/2015/04/es6-in-depth-iterators-and-the-for-of-loop
  4. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols
  5. https://stackabuse.com/es6-iterators-and-generators/
  6. https://vegibit.com/iterators-in-es6/
  7. https://javascript.info/iterable