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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!