Question: In Javascript write a pair of functions called iterate() and capWord() in Javascript The capWord accepts a string as an argument The capWord capitalizes ONLY
In Javascript write a pair of functions called iterate() and capWord() in Javascript
The capWord accepts a string as an argument The capWord capitalizes ONLY the first letter of the word The capWord function then returns the capitalized word
The iterate is a higher-order function that accepts an array of string and a function as an argument The iterate is able to iterate of the array and call the function each iteration The iterate function then returns the array of capitalized words
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
