📜  基于属性的javascript过滤器数组 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:13.145000             🧑  作者: Mango

代码示例1
var newArray = homes.filter(function (el) {
  return el.price <= 1000 &&
         el.sqft >= 500 &&
         el.num_of_beds >=2 &&
         el.num_of_baths >= 2.5;
});