How do you reverse a string in place (or in-place) in JavaScript when it is passed to a function with a return statement, without using built-in functions (.reverse()<
.reverse()<
In ES6, you have one more option
function reverseString (str) { return [...str].reverse().join('') } reverseString('Hello');