DEV Community

Discussion on: Learn these awesome Javascript concepts.

Collapse
 
jcubic profile image
Jakub T. Jankiewicz • Edited
  1. HOC is React pattern called Higher Order Components that have nothing to do with Higher Order Functions.
  2. I would add interator protocol to the list. This is the API behind generators that make them work. This is also what make for..of loops works with arrays. Because Arrays are iterators.
var iter = [1,2,3][Symbol.iterator]();
console.log(iter.next()); // {value: 1, done: false}
console.log(iter.next()); // {value: 2, done: false}
console.log(iter.next()); // {value: 3, done: false}
console.log(iter.next()); // {value: undefined, done: true}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
abhishekraj272 profile image
Abhishek Raj
  1. There was a typo, fixed it.
  2. Will add the iterator to this list.

Cheers