DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
Title Case a Sentence-Javascript
function titleCase(str) { return str.toLowerCase().replace(/(^|s)S/g, L => L.toUpperCase()); }
Source by forum.freecodecamp.org #
PREVIOUS
NEXT
Tagged:
#Title
#Case
ADD COMMENT
Topic
COMMENT
Name
4+5 =
Submit