reverse the string passed as an arg and return the result
function revstr(str) {
i = str.length; newstr = "";
while (i > 0) {
newstr += str[i - 1]; i--;
}
return newstr;
}
const chai = require("chai");
const assert = chai.assert;
describe("Solution", function() {
it("return reversed", function() {
assert.strictEqual(revstr("ok hello"), "olleh ko");
});
});