Created
June 5, 2013 06:36
-
-
Save hyonschu/5712012 to your computer and use it in GitHub Desktop.
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 splits = str.split(" "); | |
for (var i=0;i<splits.length;i++) { | |
var tempvar = []; | |
tempvar = splits[i].split("") | |
var captemp = tempvar[0].toUpperCase(); | |
tempvar[0] = captemp; | |
tempvar = tempvar.join(""); | |
splits[i] = tempvar; | |
}; | |
var str = splits.join(" ") | |
return str; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment