Question: JAVASCRIPT PLZ Write a function that takes a string as an argument, and returns that string with the first character of every word capitalized and
JAVASCRIPT PLZ
Write a function that takes a string as an argument, and returns that string with the first character of every word capitalized and all subsequent characters in lowercase. You may assume that a word is any sequence of non-whitespace characters.
EXAMPLE:
wordCap('four score and seven'); // "Four Score And Seven" wordCap('the javaScript language'); // "The Javascript Language" wordCap('this is a "quoted" word'); // 'This Is A "quoted" Word' Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
