Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript capitalize all letters

function capitalizeWords(string) {
   return string.replace(/(?:^|s)S/g, function(a) { return a.toUpperCase(); });
};
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #javascript #capitalize #letters
ADD COMMENT
Topic
Name
4+7 =