method in javascript to capitalize code example
Example 1: uppercase javascript
var str = "Hello World!";
var res = str.toUpperCase(); //HELLO WORLD!
Example 2: make first letter uppercase
const publication = "freeCodeCamp";
publication[0].toUpperCase() + publication.substring(1);