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
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)