Last active
March 20, 2020 02:06
-
-
Save kluu1/3457ca094a35cb641fdc126561c3c5fb 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
| const orders = [ | |
| { | |
| orderId: 5563, | |
| total: 673.33 | |
| }, | |
| { | |
| orderId: 5564, | |
| total: 274.99 | |
| }, | |
| { | |
| orderId: 5565, | |
| total: 130.98 | |
| }, | |
| { | |
| orderId: 5566, | |
| total: 1018.19 | |
| }, | |
| { | |
| orderId: 5567, | |
| total: 928.79 | |
| }, | |
| { | |
| orderId: 5568, | |
| total: 478.89 | |
| } | |
| ]; | |
| const largeOrders = orders.filter(order => { | |
| return order.total > 600; | |
| }); | |
| console.log(largeOrders); | |
| /* | |
| [{ orderId: 5563, total: 673.33 }, | |
| { orderId: 5566, total: 1018.19 }, | |
| { orderId: 5567, total: 928.79 }] | |
| */ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment