DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

JS Reference: Arrays

Quick reference for Arrays.

Read time: 1 min Words: 14
Open Playground → HTML My Progress

JS Reference — Arrays

Quick summary of Arrays with syntax and example.

Syntax

arr.map / arr.filter / arr.reduce

Example

const nums = [1,2,3,4];
const even = nums.filter(n => n % 2 === 0);
console.log(even);