Array.from study:
https://msdn.microsoft.com/en-us/library/k4h76zbx(v=vs.94).aspx
two concepts:
1. array-like object, an iterable object.
Array.from
syntax: Array.from(arrayLike[,mapfn [,thisArg]]);
Array-like object:
http://stackoverflow.com/questions/11886578/creating-array-like-objects-in-javascript
Iterable object:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators
JavaScript String, Array, TypedArray, Map and Set are all built-in iterables.
Read JavaScript Map
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
No comments:
Post a Comment