exam questions

Exam PL-400 All Questions

View all questions & answers for the PL-400 exam

Exam PL-400 topic 5 question 7 discussion

Actual exam question from Microsoft's PL-400
Question #: 7
Topic #: 5
[All PL-400 Questions]

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.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
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

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Vivinator1
Highly Voted 3 years, 2 months ago
box 2 should be YES also because strict equality compare is missing in line 18.
upvoted 45 times
getazusername
3 years, 1 month ago
You right thanks bro.
upvoted 1 times
...
JorgeC
3 years, 1 month ago
You are right!
upvoted 1 times
...
...
nivanpee
Highly Voted 2 years, 10 months ago
Correct answer is YYN
upvoted 7 times
...
Juan0414
Most Recent 2 months, 1 week ago
Y Y - Last if is missing === N - If anything remove-alert https://learn.microsoft.com/en-us/power-apps/maker/data-platform/use-powerapps-checker#best-practice-rules-used-by-solution-checker
upvoted 1 times
...
zick007
5 months ago
should be NNN, unless you explicitly "use strict" , the code should run just fine.
upvoted 2 times
...
yuko17
1 year, 5 months ago
Yes、Yes、No
upvoted 1 times
...
Jimmyplus05
1 year, 9 months ago
Correct Answer is Yes Yes No
upvoted 2 times
...
xanr4711
2 years, 2 months ago
shouldn't the code crash cause baseurl is not a url??
upvoted 3 times
...
j3
2 years, 7 months ago
YNN For Q2 - you have to 'use strict' within every new function
upvoted 4 times
StefanGrigorescu
2 years, 1 month ago
Could you explain your observation more in detail, please?
upvoted 1 times
jayjayone
2 years, 1 month ago
only if you write 'use strict' on top of your code you will get an exception, if you don't write 'use strict' you'll only get a warning
upvoted 4 times
...
...
Fyrus
1 year, 9 months ago
I agree with you. Warnings != Exception
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago