• slice(): Does not modify original. Extracts elements. Returns copied portion.
• splice(): Modifies original. Adds/removes/replaces. Returns removed elements.
50. What are push(), pop(), shift(), and unshift()?
Methods that modify arrays.
• push(): Add to END →
arr.push(3) • pop(): Remove from END →
arr.pop() • unshift(): Add to START →
arr.unshift(0) • shift(): Remove from START →
arr.shift() Quick Memory Trick:
push/pop = END, unshift/shift = START
❤️ Double Tap For Part 6