PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
The deferred.done() method accepts one or more arguments, all of which can be either a single function or an
array of functions. When the Deferred is resolved, the doneCallbacks are called. Callbacks are executed in the
order they were added. Since deferred.done() returns the deferred object, other methods of the deferred object
can be chained to this one, including additional .done() methods.
$.ajax
JQuery, deferred.done()


Leave a Reply