Latest Real 70-480 Tests Dumps and VCE Exam Questions 21-30

Ensurepass

QUESTION 21

You develop a webpage. The webpage must display a grid that contains one row and five columns. Columns one, three, and five are the same width. Columns two and four are the same width, but much wider than columns one, three, and five. The grid resembles the following image:

 

clip_image001

 

The grid must meet the following requirements: Each row must be tall enough to ensure that images are not cut off. Each row must contain five columns. The width of the columns must not change when the screen is resized or rotated. You need to define the style for the grid. Which CSS3 style should you use?

 

A.       

clip_image002

 

B.       

clip_image003

 

C.       

clip_image004

 

D.       

clip_image005

 

Correct Answer: C

 

 

QUESTION 22

You implement an application by using HTML5 and JavaScript. You create a webpage that contains the following HTML:

 

clip_image007

 

The application must place a border on only the first UL element that is contained in the DIV element. You need to update the webpage. What should you do?

 

A.       

clip_image008

 

B.       

clip_image009

 

C.       

clip_image010

 

D.       

clip_image011

 

Correct Answer: B

 

 

QUESTION 23

You troubleshoot a webpage that contains the following HTML element:

 

<canvas id= “clickCanvas” width-“300”> height= “300”>

 

Your browser does not support the HTML5 canvas.</canvas>

 

The following JavaScript code is included in a script tag in the HEAD section of the webpage: (Line numbers are included for reference only.)

 

clip_image013

 

You need to invoke the clickReporter() JavaScript function when a user clicks the mouse on the canvas HTML element. What should you do?

 

A.      Add the following attribute to the canvas HTML element: clicked= “clickReporter()”

B.      Replace the code segment at line 06 with the following code segment: drawBox.Click += clickReporter;

C.      Insert the following code segment at line 07: canvas.onclick = clickReporter;

D.      Insert the following code segment at line 07: canvas, click = clickReporter;

 

Correct Answer: C

 

 

QUESTION 24

You are implementing an application by using HTML5 and JavaScript. A web page contains the following HTML table.

 

clip_image014

 

The application must:

Ÿ   Identify all rows in the table body that have a class attribute of selected

Ÿ   Exclude the last selected row in the table

 

You need to implement the web page according to the requirements. Which CSS selector should you use?

 

A.      tr:not(tr:last-child).selected < #dataTable

B.      #dataTable > tr.selected:not(tr:last-child)

C.      #dataTable tbody tr.selected:not(tr:last-child)

D.      #dataTable tr.selected:not(tr:last-child)

 

Correct Answer: C

 

 

QUESTION 25

You create an application that sends information to a web service by using the following code: (Line numbers are included for reference only.)

 

clip_image015

 

When the web service returns a non-zero result code, you must raise an exception that contains the result code. You need to implement the code that generates the exception. Which line of code should you insert at line 04?

 

A.      CustomError .prototype = Error.prototype;

B.      CustomError [“ErrorType”] = Error;

C.      CustomError.customError = true;

D.      Error-constructor = CustomError;

 

Correct Answer: A

 

 

QUESTION 26

You are developing a customer web form that includes following HTML.

 

<input id= “textAccountType”/>

 

You need to develop the form so that customers can enter only a valid account type consisting of two English alphabet characters. Which code segment should you use?

 

A.       

clip_image016

 

B.       

clip_image017

 

C.       

clip_image018

 

D.       

clip_image019

 

Correct Answer: B

 

 

 

QUESTION 27

You are developing an application that uses a JavaScript library. The library contains the following functions.

 

clip_image021

 

The application uses the following code. (Line numbers are included for reference only.)

 

clip_image022

 

The library may throw many types of exceptions. The exceptions are grouped by category.

You need to catch and identify the exceptions by group.

Which code segment should you insert at line 05?

 

A.       

clip_image023

 

B.       

clip_image024

 

C.       

clip_image025

 

D.       

clip_image026

 

Correct Answer: B

 

 

QUESTION 28

DRAG DROP

You develop an HTML5 webpage. You have the following HTML markup:

 

clip_image027

 

You also have the following JavaScript variable defined:

 

var languages = [];

You need to add statements to an existing JavaScript function to sort the list items. Which four actions should you perform in sequence? (Develop the solution by selecting the required code segments and arranging them in the correct order.)

 

Select and Place:

clip_image029

 

Correct Answer:

clip_image031

 

 

QUESTION 29

DRAG DROP

You create an HTML5 webpage. You have the following HTML markup:

 

clip_image032

 

You also have the following JavaScript code segment:

 

var jsonFruit = { “apples” : “12”, “bananas” : “8”, “watermelon” : “3” }

 

You need to add additional rows to the fruitTable element by processing the jsonFruit values in the order listed. Which three actions should you perform in sequence? (Develop the solution by selecting the required code segments and arranging them in the correct order.)

 

Select and Place:

clip_image034

 

Correct Answer:

clip_image036

 

 

QUESTION 30

DRAG DROP

You have the following code:

 

clip_image037

 

The web service returns a JSON object that contains two properties named Description and FileName. The PersonImage object must meet the following requirements:

 

Ÿ   Create an object that represents an image that will be displayed.

Ÿ   Set the image properties from the values that are returned by the web service.

Ÿ   Expose the image as a property of the PersonImage object.

You need to insert code at line 13 to complete the implementation of the PersonImage object. Which three actions should you perform in sequence to complete the implementation? (Develop the solution by selecting the required code segments and arranging them in the correct order.)

 

Select and Place:

clip_image039

 

Correct Answer:

clip_image041