Question: String Changer Build a function called stringChanger() that takes in two arguments: a word and an operation. Based on the operation, your function will

String Changer
 

Build a function called stringChanger() that takes in two arguments: a word and an operation.

 Based on the operation, your function will return the word modified in some way. 

The operations are:
"capitalize": Capitalize the first letter in the word.
"uppercase": Capitalize every letter in the word.
"double": Return the word twice in a row.
"reverse": Return the string with the letters in reverse order.
If the operation is invalid, return the word, unchanged. 

 



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 Programming Questions!