Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

string to capitalize javascript

const str = 'flexiple';
const str2 = str.charAt(0).toUpperCase() + str.slice(1);
console.log(str2);

//Output: Flexiple

const str = 'abc efg';
const str2 = str.charAt(0).toUpperCase() + str.slice(1);
console.log(str2);

//Output: Abc efg
Source by flexiple.com #
 
PREVIOUS NEXT
Tagged: #string #capitalize #javascript
ADD COMMENT
Topic
Name
2+8 =