Last active
October 9, 2016 05:52
-
-
Save sAbakumoff/41efbc3c3cb1680ca300764a5d89e4fe 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
var str="JavaScript is awesome"; | |
var reduceRightFn = Array.prototype.reduceRight; | |
var reverse_str = reduceRightFn.call(str, function(char1, char2){ | |
return char1 + char2; | |
}); | |
alert(reverse_str); //emosewa si tpircSavaJ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment