Answers for "js write a function called capitalize that takes a string and returns that string with only the first letter capitalized. make sure that it can take strings that are lowercase, uppercase or both."

35

javascript capitalize first letter

const lower = 'this is an entirely lowercase string';
const upper = lower.charAt(0).toUpperCase() + lower.substring(1);
Posted by: Guest on March-04-2020

Code answers related to "js write a function called capitalize that takes a string and returns that string with only the first letter capitalized. make sure that it can take strings that are lowercase, uppercase or both."

Code answers related to "Javascript"

Browse Popular Code Answers by Language