How to check if a character is uppercase in JavaScript

1 Answer

0 votes
var ch = 'a';
document.write(ch === ch.toUpperCase());

document.write('<br />');

ch = 'Z';
document.write(ch === ch.toUpperCase());

 
 
     
/*
run:
 
false
true 
          
*/
  

 



answered Jan 20, 2020 by avibootz

Related questions

...