Answers for "how to find if given character in a string is uppercase or lowercase in javascript"

2

check if letter is uppercase javascript

const isUpperCase = (string) => /^[A-Z]*$/.test(string)
Posted by: Guest on November-28-2020
0

check if letter is uppercase javascript

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++;
}
Posted by: Guest on November-28-2020
0

how to find if given character in a string is uppercase or lowercase in javascript

var str = S;

  if (str == str.toUpperCase())
  {
    console.log(" Uppercase");
  }
  else
  {
    console.log("Lowercase");
  }
Posted by: Guest on September-17-2020

Code answers related to "how to find if given character in a string is uppercase or lowercase in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language