Which line or lines of code should you use?

DRAG DROP
You are developing an airline reservation website by using HTML5 and JavaScript. A page on the site
allows users to enter departure and destination airport information and to search for tickets.
You have the following requirements:
Users must be able to save information in the application about their favorite destination airport.
The airport information must be displayed in the destination text box whenever the user returns to
the page.
You need to develop the site to meet the requirements.
Which line or lines of code should you use? (To answer, drag the appropriate command or
commands from the list of commands to the correct location or locations in the work area. Each line
of code may be used once, more than once, or not at all. You may need to drag the split bar between
panes or scroll to view content.)

DRAG DROP
You are developing an airline reservation website by using HTML5 and JavaScript. A page on the site
allows users to enter departure and destination airport information and to search for tickets.
You have the following requirements:
Users must be able to save information in the application about their favorite destination airport.
The airport information must be displayed in the destination text box whenever the user returns to
the page.
You need to develop the site to meet the requirements.
Which line or lines of code should you use? (To answer, drag the appropriate command or
commands from the list of commands to the correct location or locations in the work area. Each line
of code may be used once, more than once, or not at all. You may need to drag the split bar between
panes or scroll to view content.)

Answer:



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Bilbo

Bilbo

LocalStorage is the right answer, because sessionstorage is deleted when the user exits the page

Levi

Levi

yeah but the question says nothing about how long the code must keep that information :/

Ricky

Ricky

Not when the user exits the page…but when the user closes the tab. No info about how long the dest info should be keept to the user. For me make more sense use the session instead of the localStotage.

Thomas

Thomas

For me: “The airport information must be displayed in the destination text box whenever the user returns to
the page.” sounds clear. I’m not a native. Doesn’t whenever means on any time including a computer restart?