update reverse string.js to take an array as a value and use charAt