Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JavaScript Chapter 11 uCertify Test

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

They are small pieces of information collected by a Web browser to help maintain state and track user activities. They can reside in memory or be placed on a hard drive in the form of a text file.

a)

HTML entities

b)

cookies

c)

brownies

d)

signed-script

2.

Embedded malicious scrip that appears to be from a trusted site. Upon clicking the link, the embedded script is submitted in the client's HTTP request and can execute on the user's computer, enabling the attacker to steal information.

a)

frame-to-frame URL change

b)

infinite loop

c)

cross-site scripting (XSS)

d)

zero-day exploit

3.

It is a JavaScript statement that has no attainable conditions for ending, and thus requires the user to close the browser in order to end the script.

a)

Buzz Lightyear Virus

b)

cross-site scripting (XSS)

c)

infinite loop

d)

same origin

4.

Which JavaScript object is used for client-side browser detection?

a)

BrowserType

b)

AppName

c)

navigator

d)

UserAgent

5.

What do you understand by an inline frame?

a)

A frame that displays a separate file floating within a page

b)

A technique in which one frame in a frameset can direct the URL in another frame to display a different page

c)

tA frame tha is developed from a plain HTML file without any other application

d)

A technique used by web applications to prevent their Web pages from being displayed within a frame

6.

In cross-site scripting, the malicious code is generally embedded in:

a)

the attacker's Web page code.

b)

an executable file.

c)

a hyperlink.

d)

the victim's e-mail application.

7.

Which of the following are based on the Gecko layout engine? (you gotta look this up)

a)

Mozilla Firefox and Google Chrome

b)

Mozilla Firefox, SeaMonkey, and Camino

c)

SeaMonkey, Edge, and Safari

d)

Safari, Google Chrome, and Camino

8.

Which of the following is a type of code injection attack?

a)

Cross-site scripting

b)

Cross-site request forgery

c)

Session hijacking

d)

SQL injection

9.

Which of the following is true in relation to security?

a)

The operating system can be secured but the browser cannot.

b)

The browser can be secured but the operating system cannot.

c)

The operating system provides a doorway to the browser for security threats.

d)

Both the operating system and the browser can be secured with anti-virus software.

10.

Which example demonstrates the proper JavaScript syntax to test for the presence of a cookie?

a)

confirm(cookie);

b)

alert(document.cookie);

c)

window.cookie = "name = value";

d)

document.cookie = "name = value";

11.

Which code will display an alert if the variable timerMinutes has a value 10?

a)

if (timerMinutes == 10) alert("Time Expired!");

b)

if ("timerMinutes" = 10) {

alert("Time Expired!");

}

c)

if ("timerMinutes" == 10); {

alert("Time Expired!");

}

d)

if ("timerMinutes" = 10) alert("Time Expired!");

12.

Why is it generally easier to debug run-time and load-time errors than to debug logic errors?

a)

Because logic errors are rarely caught by debugging tools

b)

Because run-time and load-time errors prevent the script from rendering at all

c)

Because syntax errors are rarely caught by debugging tools

d)

Because logic errors cause error alerts

13.

Which JavaScript object allows you to access previously visited Web page URLs?

a)

Location

b)

Document

c)

Navigator

d)

History

14.

Which of the following methods let you convey information to a user and doesn't record the user's response?

a)

open()

b)

prompt()

c)

alert()

d)

confirm()

15.

Which of the following methods lets you access all occurrences of an HTML tag in a Webpage?

a)

getElementByID

b)

getElementsByName

c)

getElementsByTagName

d)

innerHTML