My challenge involves filtering a property named 'miles' within an array of objects. The objective is to compare the 'miles' property value and only return those that are less than the user's specified miles. Subsequently, the values of the 'city' property should be pushed into an empty array and returned.
However, the current issue is that the code is returning an empty array instead of the desired cities/countries.
Below is the code snippet provided:
/* Your provided code snippet here */
Expected Output:
closureTrip(flights)(user) => [ 'BOLZANO', 'DUBAI', 'LISBON', 'NICE' ]
Current Output:
closureTrip(flights)(user) => []