diff --git a/js-array.md b/js-array.md index 2eab3e081..1ad0be5e8 100644 --- a/js-array.md +++ b/js-array.md @@ -14,6 +14,8 @@ list = [a,b,c,d,e] ```bash list[1] // → b list.indexOf(b) // → 1 +list.lastIndexOf(b) // → 1 +list.includes(b) // → true ``` ### Subsets @@ -81,6 +83,10 @@ list.splice(2, 1) // → [c] list == [a,b,d,e] .filter(n => ...) => array ``` +```bash +.forEach(n => ...) +``` + ```bash .find(n => ...) // es6 .findIndex(...) // es6