Skip to content

Microsoft 98-382

Introduction to Programming Using JavaScript

Verified practice questions with detailed answers, clear explanations, and community discussion.

  • 39

    questions

  • 9 days ago

    last updated

  • 4.8/5

    overall rating

Question 1 of 39

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.

Exam 98-382: Question 3 - Image 1

Which code segment should you use at line 08?

Answer choices
Show answer

Correct answer: C

To dynamically change the content of a paragraph element, the innerHTML property is used. This property sets or returns the HTML content inside an element. In this case, we want to update the content of the paragraph with the id 'tester' to display a new quote from the randomQuote() function. Therefore, the correct code segment to use is document.getElementById('tester').innerHTML = randomQuote();.

Question 2 of 39

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

Answer choices
Show answer

Correct answers: B, D

To change the image when the user's mouse pointer moves across the image, you need an event to detect when the pointer enters the area of the image and another event for when it leaves. The 'onmouseover' event triggers when the mouse pointer enters the element area, making it ideal for changing the image from the sun to the moon. The 'onmouseout' event triggers when the mouse pointer leaves the element area, which is perfect for changing the image back to the sun. These events are designed precisely for handling such hover interactions.

Question 3 of 39

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.Exam 98-382: Question 6 - Image 1

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

Answer choices
Show answer

Correct answer: B

To correctly output each room type on a new line in the HTML paragraph element with id 'para', you need to append each room type to the current inner HTML of the 'para' element and also include the existing content of 'para'. Therefore, option B is correct as it appends the current room and the existing inner HTML to 'para', ensuring each room type is displayed on a new line.

Question 4 of 39

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.Exam 98-382: Question 10 - Image 1

You create the following JavaScript code to display the warning.Exam 98-382: Question 10 - Image 2

When you choose spicy and click Order, the warning fails to display.

You need to solve this problem.

What should you do?

Answer choices
Show answer

Correct answer: D

The issue lies in how the selected value from the dropdown is being accessed in the JavaScript function. In line 10, 'option' is assigned the entire select element rather than its value. To get the value of the selected option, you need to access the 'value' property of the select element. Changing line 10 to 'var option = document.forms.orderForm["heatIndex"].value;' correctly assigns the selected value to 'option', thus ensuring that the 'if' condition on line 11 can properly check if the value is 'Spicy' and display the alert accordingly.

Question 5 of 39

You are creating a JavaScript program for an accounting system.

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

Exam 98-382: Question 35 - Image 1

You evaluate the code to ensure that it follows JavaScript best practices.

Which line should you change?

Answer choices
Show answer

Correct answer: C

The variable defined on line 03 uses 'while' as its identifier. 'while' is a reserved keyword in JavaScript and cannot be used as a variable name. Therefore, line 03 should be changed to use a different identifier that is not a reserved keyword.

34 questions still locked

Your preview covered the first 5 questions. Unlock the rest to see every explanation and discussion thread, updated weekly

View plans

Choose your plan

Single payment · No subscription · No hidden fees

Standard

For a focused sprint before your exam date

$25USD

30 days of access, single payment

  • All 39 questions unlocked
  • Detailed answer explanations
  • Community discussions and votes
  • Weekly question updates
  • Printable PDF download
  • 100% refund if you do not pass

Premium

Extra runway, the PDF, and the refund guarantee

$35$60USD

90 days of access, single payment

Printable PDF download

Save every question as a PDF for offline study or printing.

  • All 39 questions unlocked
  • Detailed answer explanations
  • Community discussions and votes
  • Weekly question updates

Full refund if you do not pass

Send us your exam result and we refund the purchase.

Stories from the certified

Charles Sirois
Canada
As this was my first certification exam, I was understandably nervous about what to expect. These study materials made the preparation process much easier, and many of the questions closely reflected those on the actual exam.
Lance Chambers
United States
Wasted about a month going through the free dump sites scattered all over reddit, half the answers were wrong and the other half were for a version of the exam that doesn't even exist anymore. Eventually gave in and paid the small fee here, and the difference was night and day.
Alisha Kelly
Italy
Honestly, I had already gone through the official documentation quite thoroughly, but still didn't feel fully confident going in. This helped things finally click for me. I realized I knew the material, but just hadn't connected all the pieces yet.
Casper Claassen
Netherlands
Used this along with Microsoft Learn and the combo worked really well. The practice questions made the stuff I'd read actually stick. Passed first attempt, no complaints from me.
Gabriele Ghesla
Italy
The content is accurate and clearly presented, and it's more affordable than competitors. The team has been incredibly responsive whenever I've had an issue, and they've been open to small changes that improve the platform.
Charles Sirois
Canada
As this was my first certification exam, I was understandably nervous about what to expect. These study materials made the preparation process much easier, and many of the questions closely reflected those on the actual exam.
Lance Chambers
United States
Wasted about a month going through the free dump sites scattered all over reddit, half the answers were wrong and the other half were for a version of the exam that doesn't even exist anymore. Eventually gave in and paid the small fee here, and the difference was night and day.
Alisha Kelly
Italy
Honestly, I had already gone through the official documentation quite thoroughly, but still didn't feel fully confident going in. This helped things finally click for me. I realized I knew the material, but just hadn't connected all the pieces yet.
Casper Claassen
Netherlands
Used this along with Microsoft Learn and the combo worked really well. The practice questions made the stuff I'd read actually stick. Passed first attempt, no complaints from me.
Gabriele Ghesla
Italy
The content is accurate and clearly presented, and it's more affordable than competitors. The team has been incredibly responsive whenever I've had an issue, and they've been open to small changes that improve the platform.
Morgan Farmer
United Kingdom
I don't usually leave reviews, but this one felt worth sharing. The questions were quite close to what actually appeared on the exam, more than I expected. I spent about a week going through the material before my test, and it helped me feel more prepared.
Remi Nuyts
United States
Passed ITIL 4 Foundation with 87%. Material was enough by itself.
Archie Hopkins
United States
I had a smooth experience from start to finish. Access was available right away, no technical issues, which made it easy to get started. The content felt relevant and aligned well with what I was looking for.
Nancy Mcbride
United States
Does what it says it does. Content felt solid, nothing confusing to navigate and I didn't run into any weird issues. I been putting off scheduling the exam for a while and going through this gave me enough confidence to finally book it and pass.
Neil Savage
United States
A very quick response was received via email when a link issue occurred. The study materials provided were high quality and extremely helpful. I was able to complete the test successfully. Many thanks for the excellent support.
Morgan Farmer
United Kingdom
I don't usually leave reviews, but this one felt worth sharing. The questions were quite close to what actually appeared on the exam, more than I expected. I spent about a week going through the material before my test, and it helped me feel more prepared.
Remi Nuyts
United States
Passed ITIL 4 Foundation with 87%. Material was enough by itself.
Archie Hopkins
United States
I had a smooth experience from start to finish. Access was available right away, no technical issues, which made it easy to get started. The content felt relevant and aligned well with what I was looking for.
Nancy Mcbride
United States
Does what it says it does. Content felt solid, nothing confusing to navigate and I didn't run into any weird issues. I been putting off scheduling the exam for a while and going through this gave me enough confidence to finally book it and pass.
Neil Savage
United States
A very quick response was received via email when a link issue occurred. The study materials provided were high quality and extremely helpful. I was able to complete the test successfully. Many thanks for the excellent support.

Before you buy

Answers about access, updates, payments, and the refund policy.

01Are these real exam questions?

Our Microsoft 98-382 questions are based on real exam experiences and are continuously updated to match the current exam format. Most candidates who study with us report passing on their first attempt, based on a self reported post exam survey.

02What happens if I don't pass the exam?

With our Premium package, you get a 100% money back guarantee. If you don't pass your exam after studying with our materials, simply contact us with your exam results and we'll refund your purchase. Terms and conditions apply, read our full refund policy to learn more.

03How often are the questions updated?

Our question bank is updated regularly based on feedback from recent exam takers. We typically review and update our content every week with reports about new questions or changes to the exam format.

04Can I extend my access period?

Yes. When your access is close to expiring, you can renew it for another 30 days directly from the exam page. If you need more time while you are still preparing, reach out and we will help.

05Is this a single payment or a subscription?

This is a single payment with no recurring charges. Once you purchase, you get full access to all exam questions for the duration of your package (30 days for Standard, 90 days for Premium). No hidden fees or automatic renewals.

06How many questions are included?

You get access to all 39 questions in our database for the Microsoft 98-382 exam. This includes detailed explanations and answer justifications to help you understand the concepts thoroughly.

07Do you offer technical support?

Yes. Email us at hello@examice.com for help with access, billing, or the platform. We read every message and typically reply within 24 hours on business days.

08Is my payment secure?

Absolutely! We use industry standard SSL encryption and process all payments through Stripe, a trusted payment processor used by millions of businesses worldwide. Your payment and personal information are completely secure.

Ready to unlock the rest

All 39 questions from $25, single payment, instant access.

Back to plans