Kikobeats / js-mythbusters

:ghost: STHAP js, where is my perf?
https://mythbusters.js.org
MIT License
632 stars 68 forks source link

Symbol API explained #71

Open karliky opened 6 years ago

karliky commented 6 years ago

Context: It would be great if we can explain how the new ES6 Symbol API works and how toPromitive is used in every type coercion.

Screenshots:

screen shot 2018-03-22 at 18 37 22 screen shot 2018-03-22 at 18 37 33 screen shot 2018-03-22 at 18 37 42
Kikobeats commented 6 years ago

Probably we need to create a new section for this

Kikobeats commented 5 years ago

An object is said to be iterable if it exposes a property called Symbol.iterable, which is a function that returns an iterator object.

https://loige.co/javascript-iterator-patterns/