Free Microsoft 98-382 Practice Test & Real Exam Questions
HOTSPOT
The ABC company offers a mid-week discount of 10% on Wednesdays.
You need to write a JavaScript function that meets the following requirements:
* Accepts the day of the week as a string
* Returns the appropriate discount
You create the following code. Line numbers are included for reference only.

You must complete the code at lines 03, 04, and 07.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.

The ABC company offers a mid-week discount of 10% on Wednesdays.
You need to write a JavaScript function that meets the following requirements:
* Accepts the day of the week as a string
* Returns the appropriate discount
You create the following code. Line numbers are included for reference only.

You must complete the code at lines 03, 04, and 07.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.

Correct Answer:

Explanation:

References: https://www.w3schools.com/jsref/jsref_switch.asp
This question requires that you evaluate the underlined text to determine if it is correct.
You review the following JavaScript code:

When this code executes, the value of x is 0.
Review the underlined text. If it makes the statement correct, select "No change is needed".
If the statement is incorrect, select the answer choice that makes the statement correct.
You review the following JavaScript code:

When this code executes, the value of x is 0.
Review the underlined text. If it makes the statement correct, select "No change is needed".
If the statement is incorrect, select the answer choice that makes the statement correct.
Correct Answer: A
Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).
HOTSPOT
You are designing a web page that contains a list of animals. The web page includes a script that outputs animals from a list.
You create the following HTML to test the script:

You need to create a function that will display the list of animals, including any formatting, in the div element.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.

You are designing a web page that contains a list of animals. The web page includes a script that outputs animals from a list.
You create the following HTML to test the script:

You need to create a function that will display the list of animals, including any formatting, in the div element.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.

Correct Answer:

Explanation:

Box 1: getElementsByTagName("ul")
Box 2: getElementsByTagName("li")
Box 3: innerHTML
Box 4: innerText
References: https://www.w3schools.com/jsref/met_element_getelementsbytagname.asp
HOTSPOT
You are designing a web page that contains a blue button. When the button is pressed, it should call a function that displays the message 'Welcome!'. When the cursor hovers over the button, the button should turn red. When the cursor leaves the button, the button should revert back to its original color of blue.
You want to complete the markup using the appropriate HTML events.
How should you complete the markup? To answer, select the appropriate event in the answer area.
NOTE: Each correct selection is worth one point.

You are designing a web page that contains a blue button. When the button is pressed, it should call a function that displays the message 'Welcome!'. When the cursor hovers over the button, the button should turn red. When the cursor leaves the button, the button should revert back to its original color of blue.
You want to complete the markup using the appropriate HTML events.
How should you complete the markup? To answer, select the appropriate event in the answer area.
NOTE: Each correct selection is worth one point.

Correct Answer:

Explanation:

References: https://www.w3schools.com/jsref/dom_obj_event.asp
