Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

make random letter capital in string javascript

var string = "freeCodecamp";

function capitalizeFirstLetter(str) {
  return str.charAt(0).toUpperCase() + str.slice(1);
}

capitalizeFirstLetter(string); // Returns "FreeCodecamp"
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #random #letter #capital #string #javascript
ADD COMMENT
Topic
Name
5+4 =