Last active
February 17, 2019 18:20
-
-
Save micheleriva/5f809936a5a2e3e2f9ad1f34672440ff 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
[1, 2, 3, 4, 5].map((item) => { | |
const evenOrOdd = item % 2 > 0 ? "odd" : "even"; | |
console.log(`${item} is ${evenOrOdd}`) | |
}) | |
// 1 is odd | |
// 2 is even | |
// 3 is odd | |
// 4 is even | |
// 5 is odd | |
// [undefined, undefined, undefined, undefined, undefined] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment