Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

capitalize name function javascript

function capitalizeName(name) {
	let nameObject = convertNameToObject(name);
	let firstName = nameObject.firstName;
	let lastName = nameObject.lastName;

	return firstName[0].toUpperCase() + firstName.substring(1, firstName.length).toLowerCase() + " " + lastName[0].toUpperCase() + lastName.substring(1, lastName.length).toLowerCase()
Source by flexiple.com #
 
PREVIOUS NEXT
Tagged: #capitalize #function #javascript
ADD COMMENT
Topic
Name
4+5 =