"SHOUTING LOUDLY!".toLowercase(); // Returns "shouting loudly!"
var message = "ARE YOU SURE?"; message = message.toLowerCase(); // message = "are you sure?"
var string = "HELLO TO YOU!"; var normalText = string.slice(0,1) + string.slice(1).toLowerCase(); // normalText = 'Hello to you!'
The first slice adds the uppercase ‘H’ to the normalText variable. The second slice adds the rest of the string but transforms it to lower case. This is assuming that the first letter of string is uppercase of course :) You can also do something similiar using the toUpperCase() method too.