Created
February 14, 2013 20:50
-
-
Save johnstew/4956289 to your computer and use it in GitHub Desktop.
Coderbyte challenge.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LetterCapitalize(str) { | |
var temp = str.split(" "); | |
function Capitalize(value){ | |
var result = value.charAt(0).toUpperCase(); | |
var substring = value.substring(1, value.length); | |
var final = result+substring; | |
return final; | |
} | |
var final = temp.map(Capitalize).join(" "); | |
return final; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment