Programmed Canon Canola calculators in 1977. Assorted platforms and languages ever since. Assisting with HOPL.info.
I am NOT looking for work -- I've got more than enough to do.
Location
Perth, WA Australia
Education
A few diplomas.
Work
Software Engineer at [Daisy Digital](https://daisydigital.com.au/)
I'm not sure what you'd call this solution, but it does reverse the string:
var times = function (n, fn /*, args*/) {
var args = [].slice.call(arguments).slice(1);
for (var i = 0; i < n; i++) {
fn.call(this, i, args);
}
return args[2];
}
var original = "lewd i did live - evil did i dwel";
var result = "";
var reversed = times(original.length, function (i, args) {
args[2] = args[1].substr(i, 1) + args[2];
}, original, result);
That's the first time I've written code that uses .call(). Won't be the last time!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm not sure what you'd call this solution, but it does reverse the string:
That's the first time I've written code that uses .call(). Won't be the last time!