Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Backward String by 9maksim
import assert from "assert";
function backwardString(value: string): string {
return value.split("").reverse().join("");
}
console.log('Example:');
console.log(backwardString('val'));
// These "asserts" are used for self-checking
assert.equal(backwardString('val'), 'lav');
assert.equal(backwardString(''), '');
assert.equal(backwardString('ohho'), 'ohho');
assert.equal(backwardString('123456789'), '987654321');
console.log("Coding complete? Click 'Check' to earn cool rewards!");
April 30, 2020