Created
October 2, 2018 12:33
-
-
Save heryvandoro/3af02d492ae34f77ecd45d99233a4db9 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
let products = [ | |
{ name: "Apple", type: "fruit" }, | |
{ name: "Monitor", type: "computer" }, | |
{ name: "Mango", type: "fruit" }, | |
{ name: "Table", type: "furniture" } | |
]; | |
console.log( | |
products.every(product => product.type === "fruit") //false | |
); | |
console.log( | |
products.some(product => product.type === "fruit") //true | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment