daily pastebin goal
71%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function someDemo(orders) {
  2.   const ordersMoreThanEqualToQuantity30Exists = orders.some(
  3.     order => order.quantity >= 30
  4.   );
  5.   WriteLine(
  6.     `Are there orders with quantity great than and equal to 30? ${ordersMoreThanEqualToQuantity30Exists}`
  7.   );
  8.  
  9.   const ordersBeforeYear2018 = orders.some(
  10.     order => order.orderDate.getFullYear() < 2018
  11.   );
  12.   WriteLine(`Are there orders ordered before 2018? ${ordersBeforeYear2018}`);
  13.  
  14.   const ordersWithIDGreaterThan100 = orders.some(order => order.id > 100);
  15.   WriteLine(`Do we have more than 100 Orders? ${ordersWithIDGreaterThan100}`);
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top