DEV Community

lionel-rowe
lionel-rowe

Posted on

3 1

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!

Top comments (1)

Collapse
 
mellen profile image
Matt Ellen-Tsivintzeli • Edited

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

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay