Page 1 of 1

a 1. Define a function named Reverse that takes a string as input and returns a copy of that string in a reverse order.

Posted: Sat May 14, 2022 7:05 pm
by answerhappygod
A 1 Define A Function Named Reverse That Takes A String As Input And Returns A Copy Of That String In A Reverse Order 1
A 1 Define A Function Named Reverse That Takes A String As Input And Returns A Copy Of That String In A Reverse Order 1 (33.57 KiB) Viewed 51 times
a 1. Define a function named Reverse that takes a string as input and returns a copy of that string in a reverse order. For example, the function call Reverse('abcd') should return the string 'dcba! 2. Assume word = 'Apples! Predict the values that each of the following method calls would return: 1. word.charAt(0) 2. word.charAt(5) 3. word.charAt(word.length-2) 4. word.substring(0,5) 5. word.substring(4,5) 6. word.substring(0, word.length-1) 7. word.substring(1, word.length)