O GoConqr está de visual novo! Conte para nós o que você achou.

Módulo 13 de 18 · Mídia

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?

 

Instruções

Para avançar no curso, envie uma tentativa deste quiz. Você pode enviá-la depois da última pergunta.

Ir para o módulo escolhido

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?