Which line of code should you use?
You are testing the value of the following variable in JavaScript.
var height = “300”;
A block of code must execute if the following conditions are true:
The height variable is set to 300
The height variable is of type string
You need to implement the code to run the test.
Which line of code should you use?
Which code segment or segments should you use?
DRAG DROP
You are developing an application for an online retailer. The company ships only to certain countries.
The application must:
Store a list of country codes in an array
Validate the country code of the shipping address against the countries array
Include a Boolean value in the array that indicates whether or not you can ship to the country
Display a list of countries that can be shipped to if the user inputs a code for a country that the
retailer cannot ship to
You need to develop the application to meet the requirements.
Which code segment or segments should you use? (To answer, drag the appropriate code segment
or segments from the list of code segments to the correct location or locations in the work area.
Each code segment 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.)
Which line of code should you use?
DRAG DROP
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 line of code should you use? (To answer, drag the appropriate line or lines of code to the
correct location or locations. 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.)
Which three types of objects should you use?
You are developing a web application that uses web workers to process images extracted from an
HTML5 CANVAS object on a web page.
You need to pass messages between the web workers and the web page.
Which three types of objects should you use? (Each correct answer presents a complete solution.
Choose three.)
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.)
Which two code segments should you use?
You are creating a class named Sedan that must inherit from the Car class. The Sedan class must
modify the inherited fourDoor () method. The Car class is defined as follows.
Future instances of Sedan must be created with the overridden method.
You need to write the code to implement the Sedan class.
Which two code segments should you use? (Each correct answer presents part of the solution.
Choose two.)
Which tag should you use?
You are modifying a blog site to improve search engine readability.
You need to group relevant page content together to maximize search engine readability.
Which tag should you use?
Which code segment should you use?
Which HTML5 element should you use?
You are developing an HTML5 web application for a surveyor company that displays topographic
images.
The application must:
Display the topographic images at different zoom levels without loss of detail
Print the topographic images without loss of detail
Work from only one source file for each topographic image
You need to ensure that the topographic images display according to the requirements.
Which HTML5 element should you use?
How should you build the code segment?
DRAG DROP
An HTML page has a CANVAS element.
You need to draw a red rectangle on the CANVAS element dynamically. The rectangle should
resemble the following graphic.
How should you build the code segment? (To answer, drag the appropriate line of code to the
correct location. 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.)