98-382試験無料問題集「Microsoft Introduction to Programming Using JavaScript 認定」

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.

解説: (GoShiken メンバーにのみ表示されます)
DRAG DROP
You are creating a web page with a script. The script will insert the window's location inside the page's input element.
How should you complete the code? To answer, drag the appropriate code segment to the correct locations. Each code segment may be used once, more than once, or not at all.
You may need to drag the split bar between panes or scroll to view content.
正解:

Explanation:

Box 1: document
Box 2: getElementById
Box 3: window
Box 4: location
References: https://www.w3schools.com/js/js_window_location.asp
HOTSPOT
Your instructor has asked you to write a program that uses simple rules to help determine if a person should take the train, drive their car, or ride a bike, depending on the conditions of the weather and the amount of gas in the car's tank.
The program has the following requirements:
* When the temperature is above 65 degrees and it is not raining, the person should be told to ride their bike.
* When it is raining, the person should be told to drive their car.
* If their car has half a tank of gas or less, they should be told to take the train.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
正解:

Explanation:

References: https://www.w3schools.com/jsref/jsref_operators.asp
DRAG DROP
You are using JavaScript to create a calculator.
You create the following HTML. Line numbers are included for reference only.

You must create a function named add() that adds the values in the a and b input elements and displays the result in the result input element.
You define the following function in JavaScript:
function add() {
}
You need to complete the body of the function.
Which three code segments should you use to develop the solution? To answer, move the appropriate code segments from the list of code segments to the answer area and arrange them in the correct order.
NOTE: Each correct selection is worth one point.
正解:

Explanation:

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