Certbus > Microsoft > MTA > 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:

Browse 39 Q&As
Questions 5

HOTSPOT

You need to evaluate the following code segment. Line numbers are included for reference only.

Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code segment.

Hot Area:

Browse 39 Q&As
Questions 6

HOTSPOT

You work as a JavaScript developer for Adventure Works. You are writing a simple script that performs the following actions: Declares and initializes an array Fills the array with 10 random integers Adds every other number starting with the first 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:

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 JavaScript code that manipulates dates. You want to initialize a Date object with the date January 1, 2017 by using the year, month, and date parameters.

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

Hot Area:

Browse 39 Q&As
Questions 9

HOTSPOT

Your instructor has asked you to write a program that uses simple rules to help determine if a person should take the train, drive their car, or ride a bike, depending on the conditions of the weather and the amount of gas in the car's tank.

The program has the following requirements:

When the temperature is above 65 degrees and it is not raining, the person should be told to ride their bike.

When it is raining, the person should be told to drive their car.

If their car has half a tank of gas or less, they should be told to take the train.

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

Hot Area:

Browse 39 Q&As
Questions 10

HOTSPOT

You are creating a function named countdown. The function accepts a single parameter, start, and displays a countdown from that number down to zero in increments of one.

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

Hot Area:

Browse 39 Q&As
Questions 11

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:

Browse 39 Q&As
Questions 12

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:

Browse 39 Q&As
Questions 13

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:

Browse 39 Q&As
Questions 14

DRAG DROP

Your instructor has asked you to implement code that would display a two-dimensional array of any size inside a

tag.

You write the following code:

You need to complete the code.

Which three segments should you use to develop the solution? To answer, move the appropriate code segments from the list of code segments to the answer area and arrange them in the correct order.

Select and Place:

Browse 39 Q&As
Questions 15

DRAG DROP

You are developing a web page that uses JavaScript. The script needs to display information to the user using a popup box.

Match each function that displays a popup box with its appropriate scenario.

To answer, drag the appropriate function from the column on the left to its appropriate scenario on the right. Each function may be used once, more than once, or not at all.

NOTE: Each correct selection is worth one point.

Select and Place:

Browse 39 Q&As
Questions 16

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 17

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;

Browse 39 Q&As
Questions 18

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

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

PDF

$45.99

VCE

$49.99

PDF + VCE

$59.99