Password Validator (Step 6) Not Returning Anything to Console


#1

I have tried running my password through the validator and nothing is printing to the console. Where am I going wrong? I am on step 6 currently. I have also tried nesting hasUppercase function inside of the isPasswordValid function. I apologize if this is a repeat of another thread - I've browsed a few of them with no luck for my issue.

function isPasswordValid(input){
  if(hasUppercase(input)){
    console.log('Password is valid');
  }
}
function hasUppercase(input){
  for(i = 0; i < input.length; i++){
    if (input[i]===input[i].toUpperCase){
        return true;
        };
  };
}
isPasswordValid('CatsandDogs');

Thank you!


#2

toUpperCase() is a method, so you need to add ():

if (input[i]===input[i].toUpperCase()) {...}

#3

Thank you, that did it!