JS

JavaScript Code Output Challenge - Function revers...

1.

What is the output of the following code?

function reverseString(str) {
  return str.split('').reverse().join('');
}

console.log(reverseString('hello'));

ohlle

lloeh

olleh

hello

1 / 32

Next