Skip to content

Commit

Permalink
Merge pull request lukehoban#59 from daliwali/master
Browse files Browse the repository at this point in the history
Include Array.prototype.find example
  • Loading branch information
lukehoban committed Mar 6, 2015
2 parents 3d4b4bf + 3c6aeca commit f92fbbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,8 @@ Math.imul(Math.pow(2, 32) - 1, Math.pow(2, 32) - 2) // 2
Array.from(document.querySelectorAll('*')) // Returns a real Array
Array.of(1, 2, 3) // Similar to new Array(...), but without special one-arg behavior
[0, 0, 0].fill(7, 1) // [0,7,7]
[1,2,3].findIndex(x => x == 2) // 1
[1, 2, 3].find(x => x == 3) // 3
[1, 2, 3].findIndex(x => x == 2) // 1
["a", "b", "c"].entries() // iterator [0, "a"], [1,"b"], [2,"c"]
["a", "b", "c"].keys() // iterator 0, 1, 2
["a", "b", "c"].values() // iterator "a", "b", "c"
Expand Down

0 comments on commit f92fbbb

Please sign in to comment.