Created
November 7, 2020 06:59
-
-
Save ranamahmud/8ed981c49c78526d13a435c2a67f823a 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 nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]; | |
function greater(num) { | |
return num > 5; | |
} | |
const largeNumbers = nums.filter(greater); | |
console.log(largeNumbers) | |
\\ [ 6, 7, 8, 9 ] | |
const largeNumbers2 = nums.filter(number => number > 5); | |
console.log(largeNumbers) | |
\\ [ 6, 7, 8, 9 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment