QuestionQ239

Extend the user experience

HOTSPOT –

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

Question Image

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

Yes or No
StatementsYesNo
The code raises the following exception: Interact with HTTP and HTTPS resources asynchronously (web-use-async).
The code raises the following exception: Use strict equality operators (web-use-strict-equality-operators).
The code raises the following exception: Avoid including debug script in non-development environments (web-remove-debug-script).
Explanation

Passing false as the third argument to XMLHttpRequest.open makes the HTTP request synchronous, violating the use-async rule. The code uses strict === comparisons. alert is covered by the separate remove-alert rule, not the remove-debug-script rule.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!