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()<
You can't because JS strings are immutable. Short non-in-place solution
[...str].reverse().join``
let str = "Hello World!"; let r = [...str].reverse().join``; console.log(r);