programming-examples/js/String/Make capitalize the first letter of a string.js
2019-11-15 12:59:38 +01:00

5 lines
173 B
JavaScript

capitalize = function(str1){
return str1.charAt(0).toUpperCase() + str1.slice(1);
}
console.log(capitalize('js string exercises'));