Skip to content

Instantly share code, notes, and snippets.

@DarkCat09
Created February 9, 2021 08:38
Show Gist options
  • Save DarkCat09/4a3cb5db921fa1a0b667df01c43f3dc2 to your computer and use it in GitHub Desktop.
Save DarkCat09/4a3cb5db921fa1a0b667df01c43f3dc2 to your computer and use it in GitHub Desktop.
Text- or Word-Reversing JavaScript / Скрипт, реверсирующий слово или текст
var word = 'слово'; // <-- your text here
var reversed = '';
for (var i = 0; i <= word.length; i++) {
reversed += word.charAt(word.length - i);
}
@DarkCat09
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment