Created
October 31, 2011 01:30
-
-
Save aaronpowell/1326706 to your computer and use it in GitHub Desktop.
Q15 - What's the index?
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
| var foo = 'abcd'; | |
| if ( foo.indexOf('a') >= 0 ) { | |
| console.log ( 'we have a match!' ); | |
| } else { | |
| console.log ( 'this is not the value you\'re looking for' ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment