-
Code revstr=s=>[s].reverse().join``
Test Cases const chai = require("chai"); const assert = chai.assert; describe("Solution", function() { it("return reversed", function() { assert.strictEqual(revstr("ok hello"), "olleh ko"); }); });
Output:
-
Code revstr=s=>s.split``.reverse().join``- revstr=s=>[...s].reverse().join``
- All
- {{group.name}} ({{group.count}})
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}