JavaScript Flashcards

1
Q

Which keyword do you use to create a variable?​

A

var

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

When a client requests a server-side script, a client will never see the server-side script, only the ____ that the web server software returns from the script.

A

HTML

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

A(n) _____ is a specific circumstance that is monitored by JavaScript and that your script can respond to in some way.

A

Event

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

Multiple lines of code that are not processed by browsers that are used to add notes about your code are called

A

Block comments

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

An object is ____ that can be treated as an individual unit or component.

A

programming code and data

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

When you assign a value to a variable, you use an equal sign, which is also called a(n) __________ operator.

A

assignment

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

____ can turn static documents into applications such as games or calculators.

A

JavaScript

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

JavaScript source files that store especially useful generic scripts used on many different websites are known as

A

libraries

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

The individual lines of code that make up a JavaScript program in a document are called

A

statements

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

A(n) ____ comment hides multiple lines of code.​

A

block

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

Special words that are part of the JavaScript language syntax and that can’t be used as variable names are known as​ ____.

A

reserved words

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

Symbols such as + and * used in expressions to manipulate operands are known as​ ____.

A

operators

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

Variables and literals contained in an expression are known as ____.

A

operands

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

____ are lines of code that are not processed by browsers, which you use to add notes about your code.​

A

comments

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

T/F JavaScript code is always stored in an external file separate from the HTML code for a web document.​

A

False

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

____ refers to programming using a scripting language that is executed from a web server.

A

server-side scripting

17
Q

Which method displays a dialog box with an OK button?​

A

alert()

18
Q

T/F Although JavaScript is considered a programming language, it is also a critical part of web page design and authoring.

A

True

19
Q

When an event occurs, your script executes any code that responds to that specific event on that specific element.

This code is known as the __________.

A

event handler

20
Q

A(n) _____ is a specific circumstance that is monitored by JavaScript and that your script can respond to in some way.

A

expression

21
Q

Some of the more popular server-side scripting languages include

A

PHP, ASP.NET, and Python

22
Q

Which method do you use to reference an element on a web page in a script?​

A

getElementById()

23
Q

The procedures associated with an object are called

A

processes

24
Q

T/F. In JavaScript code, you use the words yes and no to indicate Boolean values.

A

False

25
Q

T/F: A logical operator is used to compare two string operands for equality.

A

False

26
Q

Programming languages that require you to declare the data types of variables are called ____ typed programming languages.

A

Strongly

27
Q

A(n) ____ is a variable that is used within a function.

A

parameter

28
Q

The strict equal operator is

A

===

29
Q

Which of the following is a logical operator?

A

||

30
Q

A literal string can be assigned a zero-length string value called a(n) ____ string.

A

empty

31
Q

You can use an arithmetic operator to return the modulus of a calculation, which is the ____ when you divide one number by another number.

A

remainder left

32
Q

Which arithmetic operators have the highest precedence?

A
  • / %
33
Q

A ____ variable is one that is declared outside a function and is available to all parts of your program.

A

global

34
Q

You can use the compound ____ to combine two strings.

A

assignment operator

35
Q

Data types that can be assigned only a single value are called ____ types.

A

primitive

36
Q

Function statements are contained within the function ____.

A

braces

37
Q

Which of the following is a falsie value?
-1
1
true
0

A

0

38
Q

A(n) ____ variable is declared inside a function and is available only within the function in which it is declared.

A

local