Exam2pass
0 items Sign In or Register
  • Home
  • IT Exams
  • Guarantee
  • FAQs
  • Reviews
  • Contact Us
  • Demo
Exam2pass > Microsoft > Microsoft Certifications > 98-382 > 98-382 Online Practice Questions and Answers

98-382 Online Practice Questions and Answers

Questions 4

HOTSPOT

You evaluate the following code:

You need to determine the values of sampleStudent, sampleCourse.name, and sampleCourse.grade that are output by console.log(). What are the final values for the three variables? To answer, select the appropriate values in the answer area.

Hot Area:

Buy Now

Correct Answer:

References: https://www.w3schools.com/js/js_output.asp

Questions 5

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.

Hot Area:

Buy Now

Correct Answer:

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

Questions 6

HOTSPOT

Variable x has a value of 5. Variable y has a value of 7.

For each of the following expressions, select True if the statement evaluates to true. Otherwise, select False.

NOTE: Each correct selection is worth one point.

Hot Area:

Buy Now

Correct Answer:

References: https://www.w3schools.com/js/js_comparisons.asp

Questions 7

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:

Buy Now

Correct Answer:

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

Questions 8

HOTSPOT

You are evaluating a colleague's code to ensure it meets best practices.

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:

Buy Now

Correct Answer:

References: https://www.w3schools.com/js/js_conventions.asp

Questions 9

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.

Select and Place:

Buy Now

Correct Answer:

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

Questions 10

DRAG DROP

You are creating a web page that tests a user's 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:

Buy Now

Correct Answer:

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

Questions 11

DRAG DROP

You need to write a loop that will traverse the length of an array to find the value orange. If an array element value is null, the code should immediately go to the next element. When the value is found, the loop should exit.

How should you complete the code? To answer, drag appropriate keywords to the correct locations. Each keyword 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:

Buy Now

Correct Answer:

References: https://www.w3schools.com/js/js_arrays.asp https://www.w3schools.com/js/js_break.asp

Questions 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?

A. Change line 07 to

B. Change line 07 to

C. Change line 10 to var option.value = document.forms.orderForm["heatIndex"];

D. Change line 10 to var option = document.forms.orderForm["heatIndex"].value;

Buy Now

Correct Answer: D

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

Questions 13

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 two lines should you change?

A. 01

B. 02

C. 03

D. 04

E. 05

Buy Now

Correct Answer: CE

Exam Code: 98-382
Exam Name: Introduction to Programming Using JavaScript
Last Update: May 25, 2026
Questions: 39

PDF (Q&A)

$45.99
ADD TO CART

VCE

$49.99
ADD TO CART

PDF + VCE

$59.99
ADD TO CART

Exam2Pass----The Most Reliable Exam Preparation Assistance

There are tens of thousands of certification exam dumps provided on the internet. And how to choose the most reliable one among them is the first problem one certification candidate should face. Exam2Pass provide a shot cut to pass the exam and get the certification. If you need help on any questions or any Exam2Pass exam PDF and VCE simulators, customer support team is ready to help at any time when required.

Home | Guarantee & Policy |  Privacy & Policy |  Terms & Conditions |  How to buy |  FAQs |  About Us |  Contact Us |  Demo |  Reviews

2026 Copyright @ exam2pass.com All trademarks are the property of their respective vendors. We are not associated with any of them.