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()<
Using Array functions,
String.prototype.reverse = function(){ return [].reduceRight.call(this, function(last, secLast){return last + secLast}); }