ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 53 - PL-400 discussion

Report
Export

HOTSPOT

You develop the following JavaScript code for a web resource that will be used in a model-driven app.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.


Question 53
Correct answer: Question 53

Explanation:

Box 1: Yes

Problem patterns: Web-use-async

There are multiple ways to interact with the server or request resources. Common approaches that allow for synchronous communications include the following (These scenarios should be avoided.):

Usage of the XMLHttpRequest object passing in false for the value of the async parameter for the open function call

var requestXhr = new XMLHttpRequest();

// Explicitly setting the async parameter to false or supplying a variable with a value of false will force this as a synchronous call.

requestXhr.open('GET', '/test/test.txt', false);

Box 2: No

=== - Strict Equality Comparison is already used in the code.

Box 3: No

No debugger statement in the code, so web-remove-debug-script (avoid including debug script in non-development environments) does not apply.

Reference:

https://docs.microsoft.com/sr-cyrl-rs/powerapps/developer/model-driven-apps/best-practices/business-logic/interact-http-https-resources-asynchronously

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality

asked 05/10/2024
karl hickey
42 questions
User
0 comments
Sorted by

Leave a comment first