There are many ways to reverse a string in Javascript. Let’s explore a few of them.

Using built-in functions

const reverseString = str => [...str].reverse().join('');

Using a for loop

const reverseString = str => {
  let result = [];
  for (let i = str.length - 1; i >= 0; i--) {
    result.push(str[i]);
  }
  return result.join('');
}