Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

uppercase first letter js

function ucwords (str) {
  return (str + '').replace(/^([a-z])|s+([a-z])/g, function ($1) {
    return $1.toUpperCase();
  });
}

console.log(ucwords("hello world"));
Source by www.positronx.io #
 
PREVIOUS NEXT
Tagged: #uppercase #letter #js
ADD COMMENT
Topic
Name
7+4 =