GoConqr has a new look! Let us know what you think.

Module 13 of 18 · Media

Find cheap airline tickets

Kostas Diakogiannis

Find cheap airline tickets

A-7 Find cheap airline tickets

Given that you have this data that shows 10 airline companies and their corresponding average ticket prices.

let airlinePrices = [
  {airlinesName: 'Lufthansa', avgPriceTicket: 85.6},
  {airlinesName: 'Aegean', avgPriceTicket: 65.8},
  {airlinesName: 'KLM', avgPriceTicket: 102.82},
  {airlinesName: 'British Airways', avgPriceTicket: 114.9},
  {airlinesName: 'Iberia', avgPriceTicket: 77.2},
  {airlinesName: 'TAP Portugal', avgPriceTicket: 58.9},
  {airlinesName: 'Alitalia', avgPriceTicket: 84.2},
  {airlinesName: 'Air France', avgPriceTicket: 105.6},
  {airlinesName: 'Singapore Airlines', avgPriceTicket: 119.2},
  {airlinesName: 'Emirates', avgPriceTicket: 135.4},
]

Try to create a function that accepts a collection of data (in this case this array) and returns only the names of every airline company whose average ticket costs less than 100 Euro.

Bonus: Try to use no if-statements etc. Make this as compact as possible. Which array method should be useful here?

 

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?