Complete array method reference with examples
arr.push(item)Add to end
arr.pop()Remove from end
arr.shift()Remove from start
arr.unshift(item)Add to start
arr.splice(start, count, ...items)Insert/remove at index
arr.sort((a, b) => a - b)Sort in place
arr.reverse()Reverse in place
arr.map(x => x * 2)Transform each element
arr.filter(x => x > 5)Keep elements matching condition
arr.reduce((acc, x) => acc + x, 0)Accumulate to single value
arr.find(x => x.id === 1)Find first matching element
arr.includes(item)Check if item exists
arr.flat(2)Flatten nested arrays
arr.flatMap(x => [x, x * 2])Map + flatten one level