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 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.

Hot Area:

Buy Now

Correct Answer:

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

Questions 5

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.

Hot Area:

Buy Now

Correct Answer:

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

Questions 6

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 7

HOTSPOT

You are creating a function that does safe division.

The function has the following requirements:

The function receives two parameters for the numerator and denominator.

If the denominator is zero, the function must return false.

If the denominator is not zero, the function must return true.

You write the following code. Line numbers are included for reference only.

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_comparisons.asp https://www.w3schools.com/jsref/jsref_if.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

Evaluate the following code. Line numbers are included for reference only.

What is the value of each variable at line 07? To answer, drag the appropriate value to the correct variable. Each value 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/js/js_arithmetic.asp

Questions 10

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();

Buy Now

Correct Answer: C

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

Questions 11

You are creating a dynamic HTML page by using JavaScript.

Your page has an image of the sun. When the user's mouse pointer moves across the image of the sun, the image should change to the image of the moon. When the user's 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

Buy Now

Correct Answer: BD

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

Questions 12

You are writing a JavaScript program for Contoso Suites that will output HTML.

You need to output each room type on a new line using the correct method.

You create the following code for the function. Line numbers are included for reference only.

You need to insert the correct code at Line 9. Which line should you use?

A. document.getElementById("body").innerHTML = rooms[i] + line.innerHTML;

B. document.getElementById("para").innerHTML += rooms[i] + line.innerHTML;

C. document.getElementById("para").innerHTML += i + rooms + line.innerHTML;

D. document.getElementById("body").innerHTML += rooms + i;

Buy Now

Correct Answer: B

Questions 13

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

Buy Now

Correct Answer: A

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

Exam Code: 98-382
Exam Name: Introduction to Programming Using JavaScript
Last Update: Jun 12, 2025
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

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