javascript filter array based on attributes

Solutions on MaxInterview for javascript filter array based on attributes by the best coders in the world

showing results for - "javascript filter array based on attributes"
Clarisse
05 Jan 2020
1var newArray = homes.filter(function (el) {
2  return el.price <= 1000 &&
3         el.sqft >= 500 &&
4         el.num_of_beds >=2 &&
5         el.num_of_baths >= 2.5;
6});
7
similar questions