PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which two code segments can you use?

You are creating a JavaScript function that displays the name of a web application.
You declare the following button element.
<input type=”button” id= “About” value=”About” />
When a user clicks the button, a JavaScript function named About must be called.
You need to create an event handler that calls the About function when the button is clicked.
Which two code segments can you use? (Each correct answer presents a complete solution. Choose two.)

Which code segments should you use?

HOTSPOT
You are developing a Windows Store app by using HTML5 and JavaScript.
The app defines the following objects:
InkManager is an object to process and manipulate the ink-related data from the stylus.
InkContext is an object to hold the surface context.
CurrentPenId is an object to restrict input processing to one stroke at a time.
The app must support the following requirements:
Support the use of a stylus input device.
Begin capturing input when the stylus first touches the screen.
Render stylus movements in real time.
You need to ensure that the requirements are met.
Which code segments should you use? (To answer, select the correct option from each
drop-down list in the answer area.)

For each of the following statements, select Yes if the statement is true.

HOTSPOT
You are developing a Windows Store game. The Menu page displays when the game
launches. The Game page displays when you launch a game. The Game page reloads each
time the player chooses an incorrect answer.
The following code segment runs each time the user navigates to the Game page. Line
numbers are included for reference only.

For each of the following statements, select Yes if the statement is true. Otherwise, select
No. Each correct selection is worth one point.

How should you build the code segment?

HOTSPOT
You are creating a function by using JavaScript. The function accepts an object as the parameter and
returns a string that identifies the data type of the object.
You have the following requirements:
The function must return “Number” if the object is a number.
The function must return “String” if the object is a string.
The function must return “Unknown” if the object is neither a number nor a string.
You need to implement the function to meet the requirements.
How should you build the code segment? (To answer, select the appropriate options from the dropdown lists in the answer area.)