DEV Community

lionel-rowe
lionel-rowe

Posted on

Reverse a ‮string‬: revisited

[...'‮!dlrow ,olleH'].slice(1).reverse().join('')
Enter fullscreen mode Exit fullscreen mode

The above is executable JavaScript code, with no syntax errors. Try pasting it into your browser console.

Once you've figured it out, leave your explanation in the comments inside a spoiler tag:

{% details Spoiler %}
Your answer here
{% enddetails %}
Enter fullscreen mode Exit fullscreen mode

Happy hunting!

Discussion (1)

Collapse
mellen profile image
Matt Ellen • Edited on

Reversed direction of text after ....
Not as bad as replacing ; with ; but still evil! nicely done.