Created
July 5, 2018 22:24
-
-
Save climboid/3987d0430d1f53df1fd970340b95edca to your computer and use it in GitHub Desktop.
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
for (var i=0; i<arr.length; i++){ | |
if(arr[i] === item){ | |
return i; | |
} | |
} | |
return -1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment