Last active
March 15, 2017 00:42
-
-
Save technowar/ed3e651cbfc557206553837d571597fe to your computer and use it in GitHub Desktop.
This file contains hidden or 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 array = [0, 1, 2, 3, 4, 5]; | |
function isNotEmpty () { | |
console.log('Array is not empty'); | |
} | |
function isEmpty () { | |
console.log('Array is empty'); | |
} | |
array.reduce(() => isNotEmpty, isEmpty)(); //Array is not empty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment