FrontEnd.ro logo
Funcții pe Array-uri
let cities = [
  { name: "Bali", flightHours: 10 },
  { name: "London", flightHours: 3 },
  { name: "New York", flightHours: 6 },
  { name: "Prague", flightHours: 3 }
];


let cityBreakOptions = cities.filter((city) => {
  return city.flightHours < 5;
});
console.log(cityBreakOptions);