how to capitalize everything in a string in javascript code example
Example 1: uppercase javascript
var str = "Hello World!";
var res = str.toUpperCase(); //HELLO WORLD!
Example 2: capitalise first letter js
const string = "tHIS STRING'S CAPITALISATION WILL BE FIXED."
const string = string.charAt(0).toUpperCase() + string.slice(1)
Example 3: uppercase in javascript
"foo bar!".toUpperCase();