Reverse String Methods Javascript Mdn Array Splice Typescript