const isUpperCase = (string) => /^[A-Z]*$/.test(string)
// A minified version of the other one:
const hasLowerCase= s => s.toUpperCase() != s;
console.log("HeLLO: ", hasLowerCase("HeLLO"));
console.log("HELLO: ", hasLowerCase("HELLO"));
var strings = 'this iS a TeSt 523 Now!';
var i=0;
var character='';
while (i <= strings.length){
character = strings.charAt(i);
if (!isNaN(character * 1)){
alert('character is numeric');
}else{
if (character == character.toUpperCase()) {
alert ('upper case true');
}
if (character == character.toLowerCase()){
alert ('lower case true');
}
}
i++;
}
isUpperCase('A') // true
isUpperCase('a') // false
var str = S;
if (str == str.toUpperCase())
{
console.log(" Uppercase");
}
else
{
console.log("Lowercase");
}