Last active
April 28, 2018 21:44
-
-
Save dance2die/b976e3f0bc110529b4affcd9826e8015 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
function containsDemo(shippedOrders, domesticOrders) { | |
const firstDomesticOrder = domesticOrders[0]; | |
const equalityComparer = order => order.id === firstDomesticOrder.id; | |
const containsDomesticOrder = shippedOrders.some(equalityComparer); | |
WriteLine(`Is the first domestic order shipped? ${containsDomesticOrder}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment