Created
December 30, 2018 01:31
-
-
Save zeptobook/c36d5b8022afc37a5468c1ab2b5cafff to your computer and use it in GitHub Desktop.
array.reduceRight
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 nums = [10, 20, 30, 40, 50]; | |
var sum = nums.reduceRight(function(total, value){ | |
return total + value; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment