Question: **Need help with. Build upon the provided JavaScript, and do the following things inside the loop as directed by the code comments: 1. Find the

**Need help with.

Build upon the provided JavaScript, and do the following things inside the loop as directed by the code comments: 1. Find the character index of the comma 2. Obtain the full name of the airport using the comma character index number as a reference point, and store it in a new variable 3. Capture the international airport code at the end of the string, and store it as a variable 4. Get the Google Maps short URL from the string, using the character index number of the comma, and store it as a variable 5. Build a new string that is a hyperlink, using the Google Maps URL as the href and set it as the value of the result variable 6. BONUS Output the average number of characters of the airport names inside a paragraph after the list of airports

**Just change the code which I am providing below.

Lab 2 | COMP1073 Client-Side JavaScript

Airports

  • Beijing Capital International, https://goo.gl/maps/iPe5fAqzq8C2 PEK
  • John F Kennedy International, https://goo.gl/maps/JWwABmA3MBS2 JFK
  • Lester B. Pearson International, https://goo.gl/maps/Ypu1dJLsnQu YYZ
  • London Heathrow, https://goo.gl/maps/TFx8SrATdYr LHR
  • Tokyo Haneda International, https://goo.gl/maps/5UxH2TxbRtT2 HND

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!