Created
January 12, 2019 17:17
-
-
Save 1kohei1/ed133421ccdf88e17ae7f2a282fc13c0 to your computer and use it in GitHub Desktop.
This file contains 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
function reverse(str) { | |
var strReversed = ''; | |
for (let i = str.length - 1; i >= 0; i--) { | |
strReversed += str.charAt(i); | |
} | |
return strReversed; | |
} | |
reverse('foo 𝌆 bar'); // rab �� oof | |
reverse('mañana mañana'); // anãnam anañam | |
// Use the package like Esrever to handle such things. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment