Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array of objects in js

cars.some(car => car.color === "red" && car.type === "cabrio");
// output: true

cars.every(car => car.capacity >= 4);
// output: false
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #array #objects #js
ADD COMMENT
Topic
Name
8+1 =