Array.prototype.reversebeginnerconst chars = 'hello'.split('')
chars.reverse().join('') // β 'olleh'Split a string into characters, reverse the array, then join to produce a reversed string.
Strings don't have a reverse() method, but you can split into an array of characters, reverse, then join back.
'hello'.split('').reverse().join('') // 'olleh'