Microsoft Introduction to Programming Using JavaScript - 98-382 Exam Practice Test

HOTSPOT
You are writing a JavaScript program for Blue Yonder Airlines. The program stores various information about the airline's flights.
The program has initialized the following variables:

You need to determine the data type of the code segment based on initialization and the assignment of the variables. Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code segment.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:

References: https://www.w3schools.com/js/js_datatypes.asp
HOTSPOT
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:

References:
http://knowledgehills.com/javascript/external-javascript-syntax-disadvantages.htm
https://www.w3schools.com/js/js_whereto.asp
https://www.w3schools.com/tags/att_script_src.asp
DRAG DROP
You are creating a web page that requests a username.
You create the following HTML form:

You need to write a function that retrieves the username from the form.
How should you complete the code? To answer, drag the appropriate code segments to the correct locations. Each function 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.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:
Box 1: document
Box 2: forms
Box 3: innerHTML
References: https://www.w3schools.com/jsref/coll_doc_forms.asp
HOTSPOT
You work as a JavaScript developer for Adventure Works. You are writing a simple script that performs the following actions:
* Declares and initializes an array
* Fills the array with 10 random integers
* Adds every other number starting with the first 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:

References:
https://www.w3schools.com/jsref/jsref_push.asp
https://www.w3schools.com/js/js_arrays.asp
https://stackoverflow.com/questions/9813573/how-to-perform-a-sum-of-an-int-array