JavaScript program that reverse a string
Posted by SceDev
Last Updated: February 27, 2024

Write a JavaScript program that reverse a string.

Code:

function stringReverse(inputstring) {
    return inputstring.split('').reverse().join('');
  }

var result = stringReverse('helloworld');

console.log(result);