Skip to content

Instantly share code, notes, and snippets.

@luislobo14rap
Created September 6, 2020 15:47
Show Gist options
  • Save luislobo14rap/90d7bb358c1123f907dd7b8ae02026f3 to your computer and use it in GitHub Desktop.
Save luislobo14rap/90d7bb358c1123f907dd7b8ae02026f3 to your computer and use it in GitHub Desktop.
capitalize.js
// capitalize.js v1
function capitalize(text){
return text.replace(/\w/g, function(match){
return match.toUpperCase();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment