PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which lines of code should you use?

HOTSPOT
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 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 lines of code should you use? (To answer, select the appropriate options from the
drop-down lists in the answer area.)

You need to display the image by using the correct semantic markup

HOTSPOT
You are developing an HTML5 web application for displaying encyclopedia entries.
Each encyclopedia entry has an associated image that is referred to in the entry.
You need to display the image by using the correct semantic markup.
What should you do? (To answer, select the appropriate options from the drop-down list in
the answer area.)

Which line of code should you use?

You are developing a web page by using HTML5 and C5S3. The page includes a <div> tag
with the ID set to validate.
When the page is rendered, the contents of the <div> tag appear on a line separate from the
content above and below it. The rendered page resembles the following graphic.

The page must be rendered so that the <div> tag is not forced to be separate from the other
content. The following graphic shows the correctly rendered output.

You need to ensure that the page is rendered to meet the requirement.
Which line of code should you use?

Which code segment should you use?

HOTSPOT
You are creating a web worker for an HTML5 application.
The following tasks must be performed from within the web worker:
Register an event listener for the web worker
Start and stop the web worker
You need to define a function that performs the required tasks.
Which code segment should you use? (To answer, select the appropriate option from the
drop-down list in the answer area.)

Which two code segments can you use?

You are creating a JavaScript function that displays the name of a web application.
You declare the following button element.
<input type=”button” id= “About” value=”About” />
When a user clicks the button, a JavaScript function named About must be called.
You need to create an event handler that calls the About function when the button is clicked.
Which two code segments can you use? (Each correct answer presents a complete solution.
Choose two.)

How should you build the code segment?

HOTSPOT
You are creating a function by using JavaScript. The function accepts an object as the
parameter and returns a string that identifies the data type of the object.
You have the following requirements:
The function must return “Number” if the object is a number.
The function must return “String” if the object is a string.
The function must return “Unknown” if the object is neither a number nor a string.
You need to implement the function to meet the requirements.

How should you build the code segment? (To answer, select the appropriate options from
the drop-down lists in the answer area.)