Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created April 2, 2017 01:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save codecademydev/f46a37867e9896e11381f3f42e7be101 to your computer and use it in GitHub Desktop.
Codecademy export
//rules one upper, one lower, 8 long and one special
//5 functions
//function 1
function isPasswordValid(input) {
if(!hasUppercase(input)) {
console.log ('Password Valid');
}
//function 2
function hasUppercase(input) {
for(var i=0; i<input.length; i++) {
if (input[i]===input[i].toUpperCase){
return true;
}
}
}
}
//final input
isPasswordValid('Weed');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment