Created
December 20, 2017 16:53
-
-
Save hartraft/98cd60c790f0d78f0bbe48d7eb398a63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from() – determine the result’s constructor via the receiver | |
// (in this case, MyArray) | |
let instanceOfMyArray = MyArray.from([1, 2, 3], x => x * x); | |
// map(): the result is always an instance of Array | |
let instanceOfArray = [1, 2, 3].map(x => x * x); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment