Created
October 30, 2016 04:51
-
-
Save danielborowski/6af7d43cef5ec6e9dd9554ff41f6fb4e 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
// this function should return true if the string contains no numbers | |
// we are using the isNaN function to determine if a character is a number or not | |
function noNumbers(str) { | |
for (var i = 0; i < str.length; i++) { | |
if (isNaN(str[i])) { | |
return true; | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment