Which code segment should you use?
You are developing a website that helps users locate theaters in their area from a browser.
You created a function named findTheaters ().
The function must:
Get the current latitude and longitude of the user’s device
Pass the user’s location to findTheaters()
The user needs to access the geolocation information from the browser before searching for
theaters.
Which code segment should you use?
Which code segment should you use?
You are developing an HTML5 web application. The application loads data from a web
service by using AJAX. The application displays the data by calling the displayData function.
The data is loaded by using the following code.
You need to ensure that the data is displayed when it is successfully retrieved from the web
service.
Which code segment should you use?
Which two actions can you perform to achieve this goal?
You are developing a web page that performs CPU-intensive calculations. A web worker
processes these calculations on a separate background thread. The process is instantiated
from the web page.
You need to stop the web worker process after the calculations are completed.
Which two actions can you perform to achieve this goal? (Each correct answer presents a
complete solution. Choose two.)
Where should you place the web worker code?
You are developing an HTML5 page named main.html. The JavaScript code for the main
page is located in a file named myApp.js.
You need to create a web worker and instantiate it from main.html.
Where should you place the web worker code?
Which line of code should you insert at line 09?
You are developing a JavaScript library.
You have the following requirements:
Custom exceptions must include an error message and custom error number.
These exceptions must be thrown when data validation errors occur.
Developers must call the library to easily catch the exception and identify the problem.
You develop the following code. (Line numbers are included for reference only.)
You need to complete the code to meet the requirements.
Which line of code should you insert at line 09?
Which CSS style should you apply?
You are developing an application that retrieves a stock rate from an external web service. A
web page displays a simple rotating animation to indicate whether the stock rate is increased
or decreased.
The default image, as shown in the following graphic, indicates unchanged or neutral.
The arrow must point down if the stock rate is decreased, as shown in the following graphic.
You need to ensure that the arrow points down when the stock rate decreases.
Which CSS style should you apply?
What will be displayed in the user interface?
You need to provide real-time updates to the messages that users post in the chat application
You develop an HTML5 chat application.
You need to provide real-time updates to the messages that users post in the chat
application.
What should you do?
You need to use the least amount of development effort to meet the requirement
You are creating a rotating image of a company logo.
The logo must spin on a horizontal axis and on a vertical axis.
You need to use the least amount of development effort to meet the requirement.
What should you do?
Which two techniques should you use?
You are developing an HTML5 web application that provides a discussion forum for users.
When a user registers to access the application, the user enters an email address.
Users can enter data that can result in cross-site scripting (XSS) attacks.
You need to ensure that email input is as secure as possible.
Which two techniques should you use? (Each correct answer presents a complete solution.
Choose two.)