DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javaSript string first words to upper case
function titleCase(str) { return str.toLowerCase().replace(/(^|s)S/g, L => L.toUpperCase()); }
Source by forum.freecodecamp.org #
PREVIOUS
NEXT
Tagged:
#javaSript
#string
#words
#upper
#case
ADD COMMENT
Topic
COMMENT
Name
5+8 =
Submit