JavaScript: Array.reduceRight()