98-382 Introduction to Programming Using JavaScript

Loading demo links...

Showing 4–5 of 5 questions

Question 4

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

Select all that apply, then click Submit answer.

  • onmouseup

  • onmouseout

  • onmosedown

  • onmouseover

  • onmouseenter

Question 5

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.

Select an option, then click Submit answer.

  • No change is needed

  • the value of x is 3

  • the value of x is 5

  • the value of x is undefined