Home
Github Repo: https://github.com/bgoonz/Array-Methods-Lesson
map([๐ฝ, ๐ฎ, ๐], cook) => [๐ฟ, ๐, ๐ณ]
filter([๐ฟ, ๐, ๐ณ], isVegetarian) => [๐ฟ, ๐ณ]
reduce([๐ฟ, ๐ณ], eat) => ๐ฉ
DOWNLOAD JS FILES FOR LESSON:
map([๐ฝ, ๐ฎ, ๐], cook) => [๐ฟ, ๐, ๐ณ]
filter([๐ฟ, ๐, ๐ณ], isVegetarian) => [๐ฟ, ๐ณ]
reduce([๐ฟ, ๐ณ], eat) => ๐ฉ




Table of contents
Methods
๐จ๐ป Methods
Aux Information
Background
๐ Resources
๐ฝ Miscellaneous
Cheat sheet: Arrays
JavaScript Arrays are a very flexible data structure and used as lists, stacks, queues, tuples (e.g. pairs), etc. Some
Using Arrays
Creating Arrays, reading and writing elements:
The lengths of Arrays, adding elements:
Concatenating Arrays via spreading (...):
Clearing Arrays (removing all elements):
Looping over elements:
Looping over key-element pairs:
Creating and filling Arrays when we canโt use Array literals (e.g. because we donโt know their lengths in advance or they are too large):
Array methods
Deriving a new Array from an existing Array:
Removing an Array element at a given index:
Computing a summary of an Array:
Changing all of an Array (the input Array is modified and returned):
Finding Array elements:
Listing elements (Array.from() is needed because the methods return iterables, not Arrays):
Adding or removing an element at either end of an Array:
Last updated
Was this helpful?

