Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function someDemo(orders) {
const ordersMoreThanEqualToQuantity30Exists = orders.some(
order => order.quantity >= 30
`Are there orders with quantity great than and equal to 30? ${ordersMoreThanEqualToQuantity30Exists}`
const ordersBeforeYear2018 = orders.some(
order => order.orderDate.getFullYear() < 2018
WriteLine(`Are there orders ordered before 2018? ${ordersBeforeYear2018}`);
const ordersWithIDGreaterThan100 = orders.some(order => > 100);
WriteLine(`Do we have more than 100 Orders? ${ordersWithIDGreaterThan100}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.