Write a function-reverse of the original string


Write a function middleReverse() that takes a lowercase string as an argument and returns a lowercase string that is the reverse of the original string except for the first and last letter. You may not use the method reverse().

Examples:

The call middleReverse('a') returns 'a'.

The call middleReverse('at') returns 'at'.

The call middleReverse('excitement') returns 'enemeticxt'. The call middleReverse('racecar') returns 'racecar'.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a function-reverse of the original string
Reference No:- TGS0535731

Expected delivery within 24 Hours