var a1 = str.toUpperCase();
Here str is our string variable. The new string ( with uppercase letters ) is stored in new variable a1.
Here is the sample code
var str="This is my 1st new tutorial 123";