Search Header Logo
D4PostTestReview

D4PostTestReview

Assessment

Presentation

•

Computers

•

9th - 12th Grade

•

Practice Problem

•

Medium

Created by

TARASE MCGEE

Used 28+ times

FREE Resource

16 Slides • 18 Questions

1

media

2

media
media

3

Multiple Choice

Question image

Consider the code pictured (click to enlarge). What output will be displayed in the alert box when this script is run in the browser?

1

Morgan, Virgilia, Jeiden, Ivy

2

Morgan, Virgilia, Jeiden, Juanita, Ivy

3

Morgan, Virgilia, Jeiden, Juanita,

4

Ivy

4

media
media
media

5

Multiple Choice

Question image

Consider the code pictured (click to enlarge). How would find the position of the last letter "y" in given code?

1

nurseryRhyme.IndexOf("y")

2

nurseryRhyme.lastIndexOf("y")

3

CharAtnurseryRhyme(y)

6

media

7

Multiple Choice

Question image

Consider the code pictured (click to enlarge). What output will be displayed in the alert box when this script is run in the browser?

1

ThisCodeisCodeCrazy

2

This, Code, is Crazy

3

This is Crazy Code

4

Code

8

media
media

9

Multiple Choice

Question image

Review the code pictured (click to enlarge). Identify the keyword that must be used to display the current date.

1

myDate

2

alert

3

new

4

Date

10

media
media
media
media

11

Multiple Choice

Which of the following would you add to a regular expression that allows matches any non-word characters in an email address.

1

\s

2

\w

3

\W

4

\S

12

media
media
media
media

13

Multiple Choice

Question image

Consider the code pictured (click to enlarge). What will the alert box display when the code is run in the browser?

1

Just

2

Do

3

It

4

pop

14

media
media

15

Multiple Choice

This property can be used with any function or object? It can also be used to create custom methods, objects, and new properties.

1

custom

2

predefined

3

DOM

4

prototype

16

media
media

17

Multiple Choice

An option can only be selected by using the ___________ property on an element from the options array.

1

selectedIndex

2

getElementId

3

option

4

document

18

Multiple Choice

Question image

Click to enlarge image and consider the code. The selectedIndex property specifies or returns an integer value of the array number of the selected option. Which option will be selected if this code is run in the browser?

1

1st option

2

2nd option

3

3rd option

4

4th option

19

media
media
media

20

Multiple Choice

The __________ method retrieves the corresponding attribute.

1

setAttribute

2

getAttribute

21

Multiple Choice

The __________ method is used to dynamically modify the value of an element's attribute.

1

setAttribute

2

getAttribute

22

media
media
media

23

media

24

Multiple Choice

Question image

Click to enlarge the code. Which line of code would be substituted in order to debug the error in the code?

1

if (document.forms[2].checkThis.checked)

2

if (document.forms[0].checkThis.checked)

25

Multiple Choice

if (document.forms[1].checkThis.checked) refers to which form if used inside a function?

1

The 4th form

2

The 3rd form

3

The 2nd form

4

1st form

26

Multiple Choice

Question image

Review the code (click to enlarge). How do you know there is only one form on the webpage?

1

There are two forms on the page. One in the <body> </body> tags and one in the function.s

2

There is only one form in the function. There is only one form shown between the <body> </body> tags

3

There are no forms on this page. This is why there is an error

27

media
media
media

28

Multiple Choice

The onblur event is the opposite of the onfocus event, therefore the

1

onchange is the opposite of onfocus

2

onblur occurs when an element gets focus

3

onfocus occurs when an element gets focus

29

media
media

30

Multiple Choice

This event occurs when the value or state of an element changes.

1

onchange

2

onblur

3

onfocus

31

media
media
media

32

Multiple Choice

Question image

Click to enlarge the Code. Review the code. Which attribute is used to change the background color.

1

value

2

style

3

name

4

type

33

media
media

34

Multiple Choice

Question image

Consider the code. Which form element is referenced with this code.

1

3rd form element

2

2nd form element

3

1st form element

4

4th form element

media

Show answer

Auto Play

Slide 1 / 34

SLIDE