Created
June 7, 2019 15:02
-
-
Save agrublev/25a7775486240a2e3a86016b3c84861b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 arr1 = [1, 2, 3, 4, 5]; | |
if (arr1.indexOf(1) !== -1) { | |
console.log("Arr1 HAS the integer 1!"); | |
} | |
if (arr1.includes(1)) { | |
console.log("Arr1 HAS the integer 1!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment