Skip to content

Instantly share code, notes, and snippets.

@thanhlmm
Last active November 26, 2021 15:07
Show Gist options
  • Save thanhlmm/9907f7718a2e35bf006de0ded31a8088 to your computer and use it in GitHub Desktop.
Save thanhlmm/9907f7718a2e35bf006de0ded31a8088 to your computer and use it in GitHub Desktop.
Array select
const a = [1,2,3]
// Add item
a.push(4);
// Remove item 2
const newA = a.filter(item => item != 2)
// Check if 1 exist in array
a.includes(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment