Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to change the first Letter to uppercase js

let name = 'john';
name = name.charAt(0).toUpperCase() + name.slice(1); //slice(index) return string from index to index

console.log(name); // John
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #Letter #uppercase #js
ADD COMMENT
Topic
Name
9+4 =