Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to make first letter uppercase in javascript

var name = prompt("What is your name");
firstLetterUpper = name.slice(0,1).toUpperCase();

alert("Hello " + firstLetterUpper + name.slice(1, name.length).toLowerCase());
Source by www.positronx.io #
 
PREVIOUS NEXT
Tagged: #letter #uppercase #javascript
ADD COMMENT
Topic
Name
3+6 =