Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Backward String by manmeet.s.oberoi
import assert from "assert";
function backwardString(value: string): string {
// your code here
return Array.from(value).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!");
Aug. 9, 2020