Introduction
Imagine that we are working for Airbnb as developers, and we need to add a filter feature when someone is looking for a home. Imagine somebody starts their search for places in Barcelona, so we bring all the rooms available there.
But it´s summer, and the customers who are searching for rooms want the place to have a pool. Our incredible platform will include a filter feature, so we have to work on it.
Giving the following arrays of objects, let's filter just the one with a pool.
Task 1
Filter the places and only get the ones with the pool available.
Task 2
Using the filter
method again, create an array named budgetPlaces
which contains only Private Room
s cheaper than 170
$.
Go ahead to Repl.it, using the code below as your starting point.