My code apparently gives the correct result but I am still getting the following error:
- The function hasUpperCaseLetters should check if there are uppercase letters in the string
Please let me know what's wrong with my code:
export const hasUpperCaseLetters = (s) => {
for(let i = 0; i <= s.length; i++){
if(toString(s).charAt(i) === toString(s).charAt(i).toUpperCase()){
return true;
}else{
return false}
}
}