Answers for "make random letter capital in string javascript"

0

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"
Posted by: Guest on June-09-2020

Code answers related to "make random letter capital in string javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language