Beginner5 min
Reverse a String
Return a new string with its characters in reverse order. Preserve spaces, punctuation, and letter case.
Your function
Implement solve(value, extra) in JavaScript. Return the answer; printing alone does not count as a result.
Examples
Input:
["hello"]Output:
"olleh"Input:
["forge"]Output:
"egrof"Constraints
Input contains at most 1,000 values or characters. Numbers are finite integers. Inputs follow the structure shown in the examples.