microsoft 98-382 Exam Questions

Questions for the 98-382 were updated on : Jun 17 ,2024

Page 1 out of 3. Viewing questions 1-15 out of 40

Question 1

DRAG DROP
A JavaScript array is initialized as follows:

You write the following code to manipulate the array:

You need to determine the contents of the array.
Which four elements does the array contain in sequence? To answer, move the appropriate elements from the list of
elements to the answer area and arrange them in the correct order.
Select and Place:

Answer:


Explanation:
References: https://www.bennadel.com/blog/1796-javascript-array-methods-unshift-shift-push-and-pop.htm

Discussions
0 / 1000

Question 2

DRAG DROP
You are creating a web page that tests a users ability to accurately type text. The validation should be case-insensitive.
How should you complete the code? To answer, drag appropriate functions 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.
Select and Place:

Answer:


Explanation:
References: https://www.w3schools.com/jsref/prop_text_value.asp

Discussions
0 / 1000

Question 3

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

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

Discussions
0 / 1000

Question 4

DRAG DROP
Your instructor has asked you to implement code that would display a two-dimensional array of any size inside a
You write the following code:

You need to complete the code.
Which three 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.
Select and Place:

Answer:


Explanation:
References: http://www.plus2net.com/javascript_tutorial/array-two-dimension.php

Discussions
0 / 1000

Question 5

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.
Select and Place:

Answer:


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

Discussions
0 / 1000

Question 6

You are designing a web page with a script that must dynamically change the content of a paragraph element to display the
value returned by the function randomQuote().
You have created the following code. Line numbers are included for reference only.

Which code segment should you use at line 08?

  • A. document.getElementById("tester").value = randomQuote();
  • B. document.getElementById("tester").title = randomQuote();
  • C. document.getElementById("tester").innerHTML = randomQuote();
  • D. document.getElementById("tester").script = randomQuote();
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%

Explanation:
References: https://www.w3schools.com/html/html_scripts.asp

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 7

You are creating a JavaScript program for an accounting system.
You create the following code. Line numbers are included for reference only.

You evaluate the code to ensure that it follows JavaScript best practices.
Which line should you change?

  • A. 01
  • B. 02
  • C. 03
  • D. 04
  • E. 05
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 8

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.

  • A. No change is needed
  • B. the value of x is 3
  • C. the value of x is 5
  • D. the value of x is undefined
Answer:

A

User Votes:
A
50%
B
50%
C
50%
D
50%

Explanation:
References: https://www.w3schools.com/js/js_arithmetic.asp

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 9

HOTSPOT
You are designing a function that allows you to perform unit tests on other functions in a library. You will invoke each library
function by using the eval JavaScript function. If an exception occurs when invoking a function, you want to display a
message box with the following message:
The function does not exist.
How should you complete the code? To answer, select the appropriate code segment in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Explanation:
References: https://www.w3schools.com/jsref/jsref_try_catch.asp

Discussions
0 / 1000

Question 10

You are writing an engineering application. You need to create a function that will round numbers to 3 or more decimal
places.
You need to create a function that receives the following two parameters:
The value parameter is the number to be formatted

The digits parameter is the number of digits to display The function must return the value with the number of digits

specified.
Which function should you use?

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%

Explanation:
References: https://www.w3schools.com/jsref/jsref_tofixed.asp

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 11

HOTSPOT
You are using JavaScript to write a safe root math utility that has the following requirements:
Given the function safeRoot(a, b):
If the radicand (a) is non-negative, return Math.pow (a, 1/b); Otherwise,
If the index (b) is divisible by 2, then return text indicating the result is imaginary. Otherwise return -Math.pow (-a, 1/b)
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.
Hot Area:

Answer:


Explanation:
References: https://www.w3schools.com/js/js_if_else.asp

Discussions
0 / 1000

Question 12

You are creating a web page that allows customers to choose how hot their spice is. If they choose spicy, a warning should
be displayed.
You create the following form. Line numbers are included for reference only.

You create the following JavaScript code to display the warning.

When you choose spicy and click Order, the warning fails to display.
You need to solve this problem.
What should you do?

  • B. Change line 07 to Order
  • C. Change line 10 to var option.value = document.forms.orderForm[“heatIndex”];
  • D. Change line 10 to var option = document.forms.orderForm[“heatIndex”].value;
Answer:

D

User Votes:
B
50%
C
50%
D
50%

Explanation:
References: https://www.w3schools.com/jsref/coll_doc_forms.asp

Discussions
vote your answer:
B
C
D
0 / 1000

Question 13

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

Answer:


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

Discussions
0 / 1000

Question 14

You are creating a dynamic HTML page by using JavaScript.
Your page has an image of the sun. When the users mouse pointer moves across the image of the sun, the image should
change to the image of the moon. When the users mouse pointer is no longer over the image should change back to the
image of the sun.
You need to write the code for the image swap.
Which two events must you program for? (Choose two.)

  • A. onmouseup
  • B. onmouseout
  • C. onmosedown
  • D. onmouseover
  • E. onmouseenter
Answer:

B D

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%

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

Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 15

HOTSPOT
You need to evaluate the following code segment. Line numbers are included for reference only.

Use the drop-down menus to select the answer choice that answers each question based on the information presented in
the code segment.
Hot Area:

Answer:


Discussions
0 / 1000
To page 2