String Changer Build a function called stringChanger() that takes in two arguments: a word and an
Fantastic news! We've Found the answer you've been seeking!
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 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.
Related Book For
Posted Date: