Page 1 of 1

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

Posted: Sat May 14, 2022 6:33 pm
by answerhappygod
1 Define A Function Named Reverse That Takes A String As Input And Returns A Copy Of That String In Reverse Order For 1
1 Define A Function Named Reverse That Takes A String As Input And Returns A Copy Of That String In Reverse Order For 1 (32.26 KiB) Viewed 24 times
1. Define a function named Reverse that takes a string as input and returns a copy of that string in 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(o) 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)