Last active
November 26, 2021 15:07
-
-
Save thanhlmm/9907f7718a2e35bf006de0ded31a8088 to your computer and use it in GitHub Desktop.
Array select
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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