Created
October 27, 2019 04:26
-
-
Save haru01/fb59b5a211f7c89ef6e7e6ce11167ea9 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
let result = 0; | |
[1,2,3,4,5,6].forEach((n) => { | |
if (n % 2 === 0) { | |
result += n * n; | |
} | |
}); | |
console.log(result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment