Skip to content

Instantly share code, notes, and snippets.

View fjmiguel's full-sized avatar
🎯
Focusing

Fernando Miguel fjmiguel

🎯
Focusing
View GitHub Profile
@fjmiguel
fjmiguel / README.md
Created May 24, 2022 11:51
JS - Which array method to use

JS - Which array method to use?

Array built-in object documentation

To mutate original array

Add to original

  • .push() (end)
  • .unshift() (start)

Remove from original

  • .pop() (end)
  • .shift() (start)