Class 05 Flashcards

1
Q

Scripting language which is used to enhance the

functionality and appearance of web pages.

A

Javascript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

indicates to the browser that the following text is a part of a script

A

script tag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

write into an HTML document

A

innerHTML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

write into HTML output box

A

document.write()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

write into an alert box

A

window.alert()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

write into the browsers console

A

console.log()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Gives you the ability to generate part or all of a web page’s content at the time it is shown to the user

A

Scripting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Used to declare the names of variables

A

var

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A single-line comment begins with the characters

A

//

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Multiline comments begin with delimiter

A

/* hello
world
!!!
*/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

• A variable is assigned a value with an …

A

assignment operator (=)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Signifies that a variable has no value

A

null keyword

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

converts its string argument to an integer

A

parseInt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

error that occurs at execution time.

A

logical error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

an error that causes a script to fail and terminate prematurely.

A

fatal logical error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

an error that allows a script to continue executing, but the script produces incorrect results

A

nonfatal logical error

17
Q

skips the remaining statements in the body of the statement and proceeds with the next iteration of the loop
• In while and do…while statements, the loop-continuation test evaluates immediately after the continue statement
executes
• In for statements, the increment expression executes, then the loop-continuation test evaluates

A

continue statement in while, for, and do-while

18
Q

operator is used to ensure that two conditions are both true before
choosing a certain path of execution

A

the && operator (AND)

19
Q

reverses the meaning of a condition (i.e., a true
value becomes false, and a false value
becomes true)
• Has only a single condition as an operand (i.e.,
it is a unary operator)
• Placed before a condition to evaluate to true if
the original condition (without the logical
negation operator) is false

A

!(condition) logical negation

20
Q

passes information from inside a function back to the point in the program where it was called

A

return statement

21
Q

a programmer-defined function that is used to determine and

return the largest of three floating-point values.

A

maximum

22
Q

Method that rounds its argument down to the closest integer

A

Math.floor

23
Q

Random number generation

A

Math.random()

24
Q

a standard object model and programming interface for

HTML.

A

HTML DOM

25
Q

a standard for how to get, change, add, or

delete HTML elements.

A

HTML DOM

26
Q

is an API that allows programs to

interact with HTML (or XML) documents

A

Document Object Model

27
Q

JavaScript programs access the DOM through a host object named

A

document

28
Q

gives you scripting access to all the elements on a web

page.

A

DOM

29
Q

modern browsers have implemented (almost) the same methods and
properties for JavaScript interactivity, it is often referred to

A

Browser Object Model (BOM)

30
Q

window.location.href RETURNS?

A

href, URL of the current page

31
Q

window.location.hostname RETURNS?

A

domain name of the web host

32
Q

window.location.pathname RETURNS?

A

path and file name of the current page

33
Q

window.location.protocol RETURNS?

A

protocol used

eg (http:// or https://)

34
Q

window.location.assign() RETURNS?

A

loads a new page