JavaScript Lower case text to Uppercase var a1 = str.toUpperCase(); Uppercase letters to Lower case var a2 = str.toLowerCase(); Checking number using isNaN function isNaN() to check any data is number or string var my_string= This is a string ; if(isNaN(my_string)){ document.write ( this is not a number ); }else{document.write ( this is a number ); }