1. Define a function named Reverse that takes a string as input and returns a copy of that string in reverse order. For
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
1. Define a function named Reverse that takes a string as input and returns a copy of that string in reverse order. For
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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!