Created
February 3, 2020 09:29
-
-
Save daGrevis/d2d5a92c0f3e541e2581c1c5915fd21e 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
const x = [1, 2, 3] | |
x.reduce((n, acc) => { | |
if (n > 2) { | |
return acc | |
} | |
return acc + n | |
}, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment