Created
May 25, 2017 16:48
-
-
Save JacksonRMC/1256514382ab6ba6c7a6a7e0794a62ba 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 productExceptSelf = function(nums) { | |
let output = []; | |
for ( let i = 0 ; i < nums.length ; i++ ){ | |
output.push(nums.reduce((x, y) => x + y) - nums[i]); | |
} | |
return output; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment