Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created April 28, 2018 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dance2die/80b52df7f322e4281969c08494a8c26c to your computer and use it in GitHub Desktop.
Save dance2die/80b52df7f322e4281969c08494a8c26c to your computer and use it in GitHub Desktop.
function sequenceEqualDemo(shippedOrders, domesticOrders) {
const sameOrderAreSame = shippedOrders.every(
(order, i) => order.id === shippedOrders[i].id
);
WriteLine(`Same Orders share the same sequence ${sameOrderAreSame}`);
const areAllDomesticOrdersShipped = shippedOrders.every(
(order, i) => order.id === domesticOrders[i].id
);
WriteLine(`Are All Domestic Order Shipped? ${areAllDomesticOrdersShipped}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment