Question: Write a recursive function that takes an array of words and returns an array that contains all the words capitalized. If this is the input
Write a recursive function that takes an array of words and returns an array that contains all the words capitalized.
If this is the input array:
foo 'bar', 'world', 'hello'
The output array should be:
FOO 'BAR', 'WORLD', 'HeLlo'
Here is a hint: Run the following snippet of code. is first position as we've done before. The : returns the rest of the list. Now what
happens if you use that as a recursive argument passed back into a function? 'red', 'blue', 'green', 'black'. What is now etc etc.
arrupper is ok to use in this case.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
