Created
October 30, 2016 04:51
-
-
Save danielborowski/6e13c88090abf28e2547dcc7218cf2e1 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 will now correctly return true if the string contains no numbers | |
// otherwise it will return false | |
function noNumbers(str) { | |
for (var i = 0; i < str.length; i++) { | |
if (!isNaN(str[i])) { | |
return false; | |
} | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment