Created
February 9, 2021 08:38
-
-
Save DarkCat09/4a3cb5db921fa1a0b667df01c43f3dc2 to your computer and use it in GitHub Desktop.
Text- or Word-Reversing JavaScript / Скрипт, реверсирующий слово или текст
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var word = 'слово'; // <-- your text here | |
var reversed = ''; | |
for (var i = 0; i <= word.length; i++) { | |
reversed += word.charAt(word.length - i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test