Vcehome > Microsoft > MTA: Introduction to Programming Using JavaScript > 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:

Browse 39 Q&As
Questions 5

HOTSPOT

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

Hot Area:

Browse 39 Q&As
Questions 6

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:

Browse 39 Q&As
Questions 7

HOTSPOT

You are planning to use the Math object in a JavaScript application. You write the following code to evaluate various Math functions:

What are the final values for the three variables? To answer, select the appropriate values in the answer area. NOTE: Each correct selection is worth one point.

Hot Area:

Browse 39 Q&As
Questions 8

HOTSPOT

You are creating a calendar application. You need to ensure that the code works correctly for all months of the year.

How should you complete the code? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

Browse 39 Q&As
Questions 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:

Browse 39 Q&As
Questions 10

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

Browse 39 Q&As
Questions 11

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;

Browse 39 Q&As
Questions 12

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

Browse 39 Q&As
Questions 13

You are writing a function that calculates the remainder for integer division. The function receives two parameters, a and b, and must return the remainder that is left over when the integer a is divided by the integer b. You create the following code. Line numbers are for reference only.

You want to complete the function for lines 02 and 03.

Which two sets of code segments should you use? Each correct answer presents a complete solution. (Choose two.)

A. Option A

B. Option B

C. Option C

D. Option D

E. Option E

F. Option F

Browse 39 Q&As
Exam Code: 98-382
Exam Name: Introduction to Programming Using JavaScript
Last Update: May 02, 2024
Questions: 39 Q&As

PDF

$49.99

VCE

$59.99

PDF + VCE

$67.99