Deck 2: Working With Functions Data Types and Operators

Full screen (f)
exit full mode
Question
A(n)____ statement is a statement that returns a value to the statement that called the function.

A) return
B) replace
C) value
D) exit
Use Space or
up arrow
down arrow
to flip the card.
Question
A ____ variable is one that is declared outside a function and is available to all parts of your program.

A) local
B) limited
C) scoped
D) global
Question
Programming languages that require you to declare the data types of variables are called ____ typed programming languages.

A) dynamic
B) strongly
C) static
D) loosely
Question
Data types that can be assigned only a single value are called ____ types.

A) primitive
B) null
C) numeric
D) Boolean
Question
You can use the compound ____ to combine two strings.

A) value separator
B) equals comparison
C) assignment operator
D) declaration operator
Question
In JavaScript programming, you can write your own procedures, called ____, which refer to a related group of JavaScript statements that are executed as a single unit.

A) programs
B) functions
C) modules
D) objects
Question
Parentheses are used with expressions to change the associativity with which individual operations in an expression are evaluated.
Question
A logical operator is used to compare two string operands for equality.
Question
In JavaScript code, you use the words yes and no to indicate Boolean values.
Question
The strict equal operator is ____.

A) =
B) ==
C) ===
D) !=
Question
A(n)____ is a variable that is used within a function.

A) method
B) property
C) parameter
D) operator
Question
The ____ operator executes one of two expressions based on the results of a conditional expression.

A) .
B) ()
C) ,
D) ?:
Question
A(n)____ is a positive or negative number with no decimal places.

A) floating-point number
B) scientific number
C) exponential number
D) integer
Question
An anonymous function is a set of related statements that is assigned a name.
Question
JavaScript is a ____ programming language.

A) static typed
B) loosely typed
C) strongly typed
D) numeric typed
Question
A(n)____ tells the compiler or interpreter that the character that follows it has a special purpose.

A) exclamation point
B) escape character
C) null character
D) upper case character
Question
A literal string can be assigned a zero-length string value called a(n)____ string.

A) empty
B) undefined
C) short
D) byte
Question
A comparison operator is used to compare two operands and determine if one numeric value is greater than another.
Question
The And operator is ____.

A) !=
B) ||
C) &&
D) ===
Question
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
B) quotient
C) product
D) difference
Question
A(n)____________________ variable is declared inside a function and is available only  within the function in which it is declared.
Question
Match between columns
The order in which operations in an expression are evaluated
addEventListener()
The order in which operations in an expression are evaluated
function definition
The order in which operations in an expression are evaluated
Boolean
The order in which operations in an expression are evaluated
function call
The order in which operations in an expression are evaluated
scope
The order in which operations in an expression are evaluated
floating-point
The order in which operations in an expression are evaluated
falsy
The order in which operations in an expression are evaluated
postfix operator
The order in which operations in an expression are evaluated
operator precedence
The order in which operations in an expression are evaluated
innerHTML
Method that lets you specify an event handler for an event
addEventListener()
Method that lets you specify an event handler for an event
function definition
Method that lets you specify an event handler for an event
Boolean
Method that lets you specify an event handler for an event
function call
Method that lets you specify an event handler for an event
scope
Method that lets you specify an event handler for an event
floating-point
Method that lets you specify an event handler for an event
falsy
Method that lets you specify an event handler for an event
postfix operator
Method that lets you specify an event handler for an event
operator precedence
Method that lets you specify an event handler for an event
innerHTML
The code that invokes a named function
addEventListener()
The code that invokes a named function
function definition
The code that invokes a named function
Boolean
The code that invokes a named function
function call
The code that invokes a named function
scope
The code that invokes a named function
floating-point
The code that invokes a named function
falsy
The code that invokes a named function
postfix operator
The code that invokes a named function
operator precedence
The code that invokes a named function
innerHTML
A property whose value is the content between an element's opening and closing tags
addEventListener()
A property whose value is the content between an element's opening and closing tags
function definition
A property whose value is the content between an element's opening and closing tags
Boolean
A property whose value is the content between an element's opening and closing tags
function call
A property whose value is the content between an element's opening and closing tags
scope
A property whose value is the content between an element's opening and closing tags
floating-point
A property whose value is the content between an element's opening and closing tags
falsy
A property whose value is the content between an element's opening and closing tags
postfix operator
A property whose value is the content between an element's opening and closing tags
operator precedence
A property whose value is the content between an element's opening and closing tags
innerHTML
A number that contains decimal places or that is written in exponential notation
addEventListener()
A number that contains decimal places or that is written in exponential notation
function definition
A number that contains decimal places or that is written in exponential notation
Boolean
A number that contains decimal places or that is written in exponential notation
function call
A number that contains decimal places or that is written in exponential notation
scope
A number that contains decimal places or that is written in exponential notation
floating-point
A number that contains decimal places or that is written in exponential notation
falsy
A number that contains decimal places or that is written in exponential notation
postfix operator
A number that contains decimal places or that is written in exponential notation
operator precedence
A number that contains decimal places or that is written in exponential notation
innerHTML
A value treated in comparison operations as the Boolean value false
addEventListener()
A value treated in comparison operations as the Boolean value false
function definition
A value treated in comparison operations as the Boolean value false
Boolean
A value treated in comparison operations as the Boolean value false
function call
A value treated in comparison operations as the Boolean value false
scope
A value treated in comparison operations as the Boolean value false
floating-point
A value treated in comparison operations as the Boolean value false
falsy
A value treated in comparison operations as the Boolean value false
postfix operator
A value treated in comparison operations as the Boolean value false
operator precedence
A value treated in comparison operations as the Boolean value false
innerHTML
Placed after a variable
addEventListener()
Placed after a variable
function definition
Placed after a variable
Boolean
Placed after a variable
function call
Placed after a variable
scope
Placed after a variable
floating-point
Placed after a variable
falsy
Placed after a variable
postfix operator
Placed after a variable
operator precedence
Placed after a variable
innerHTML
Can be either global or local
addEventListener()
Can be either global or local
function definition
Can be either global or local
Boolean
Can be either global or local
function call
Can be either global or local
scope
Can be either global or local
floating-point
Can be either global or local
falsy
Can be either global or local
postfix operator
Can be either global or local
operator precedence
Can be either global or local
innerHTML
A logical value of true or false
addEventListener()
A logical value of true or false
function definition
A logical value of true or false
Boolean
A logical value of true or false
function call
A logical value of true or false
scope
A logical value of true or false
floating-point
A logical value of true or false
falsy
A logical value of true or false
postfix operator
A logical value of true or false
operator precedence
A logical value of true or false
innerHTML
The lines that make up a function
addEventListener()
The lines that make up a function
function definition
The lines that make up a function
Boolean
The lines that make up a function
function call
The lines that make up a function
scope
The lines that make up a function
floating-point
The lines that make up a function
falsy
The lines that make up a function
postfix operator
The lines that make up a function
operator precedence
The lines that make up a function
innerHTML
Question
Placing a parameter name within the parentheses of a function definition is the equivalent of declaring a new ____________________ .
Question
The variables or values that you place in the parentheses of a function call statement are called ____ .

A)string operators
B)primitive types
C)arguments
D)event listeners
Question
What is the relationship between Boolean values, truthy values, and falsy values?
Question
Which arithmetic operators have the highest precedence?

A) * / %
B) < <=
C) &&
D) + -
Question
Explain what logical operators are, and then list the 3 JavaScript logical operators and explain what each does.
Question
A(n)____________________ operator requires an operand before and after the operator.
Question
What are the differences between using a the increment and decrement unary operators as prefix operators versus using them as postfix operators?
Question
Function statements are contained within the function ____.

A)parameters
B)braces
C)arguments
D)parentheses
Question
Sending arguments to the parameters of a called function is called ____________________ arguments.
Question
What is the difference between the operation of the + operatorwith numbers and with strings? Provide an example of each, including the results.
Question
A(n)____________________ type is the specific category of information that a variable contains.
Question
Operator precedence is the system that determines the order in  which operations in an expression are evaluated.
Question
Define variable scope, and describe the two types of variable scope and how you create each.
Question
JavaScript supports five primitive data types. Name and describe these types.
Question
Which of the following is a logical operator?

A)++
B)()
C)==
D)||
Question
What are the advantages of using the addEventListener()method instead of the other two methods to specify an event handler?
Question
Which of the following is a falsy value?

A)true
B)-1
C)0
D)1
Question
Describe the two types of functions and explain when you'd use each type.
Question
What is a browser console and how is it useful for a web developer?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/41
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 2: Working With Functions Data Types and Operators
1
A(n)____ statement is a statement that returns a value to the statement that called the function.

A) return
B) replace
C) value
D) exit
A
2
A ____ variable is one that is declared outside a function and is available to all parts of your program.

A) local
B) limited
C) scoped
D) global
D
3
Programming languages that require you to declare the data types of variables are called ____ typed programming languages.

A) dynamic
B) strongly
C) static
D) loosely
B
4
Data types that can be assigned only a single value are called ____ types.

A) primitive
B) null
C) numeric
D) Boolean
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
5
You can use the compound ____ to combine two strings.

A) value separator
B) equals comparison
C) assignment operator
D) declaration operator
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
6
In JavaScript programming, you can write your own procedures, called ____, which refer to a related group of JavaScript statements that are executed as a single unit.

A) programs
B) functions
C) modules
D) objects
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
7
Parentheses are used with expressions to change the associativity with which individual operations in an expression are evaluated.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
8
A logical operator is used to compare two string operands for equality.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
9
In JavaScript code, you use the words yes and no to indicate Boolean values.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
10
The strict equal operator is ____.

A) =
B) ==
C) ===
D) !=
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
11
A(n)____ is a variable that is used within a function.

A) method
B) property
C) parameter
D) operator
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
12
The ____ operator executes one of two expressions based on the results of a conditional expression.

A) .
B) ()
C) ,
D) ?:
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
13
A(n)____ is a positive or negative number with no decimal places.

A) floating-point number
B) scientific number
C) exponential number
D) integer
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
14
An anonymous function is a set of related statements that is assigned a name.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
15
JavaScript is a ____ programming language.

A) static typed
B) loosely typed
C) strongly typed
D) numeric typed
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
16
A(n)____ tells the compiler or interpreter that the character that follows it has a special purpose.

A) exclamation point
B) escape character
C) null character
D) upper case character
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
17
A literal string can be assigned a zero-length string value called a(n)____ string.

A) empty
B) undefined
C) short
D) byte
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
18
A comparison operator is used to compare two operands and determine if one numeric value is greater than another.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
19
The And operator is ____.

A) !=
B) ||
C) &&
D) ===
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
20
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
B) quotient
C) product
D) difference
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
21
A(n)____________________ variable is declared inside a function and is available only  within the function in which it is declared.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
22
Match between columns
The order in which operations in an expression are evaluated
addEventListener()
The order in which operations in an expression are evaluated
function definition
The order in which operations in an expression are evaluated
Boolean
The order in which operations in an expression are evaluated
function call
The order in which operations in an expression are evaluated
scope
The order in which operations in an expression are evaluated
floating-point
The order in which operations in an expression are evaluated
falsy
The order in which operations in an expression are evaluated
postfix operator
The order in which operations in an expression are evaluated
operator precedence
The order in which operations in an expression are evaluated
innerHTML
Method that lets you specify an event handler for an event
addEventListener()
Method that lets you specify an event handler for an event
function definition
Method that lets you specify an event handler for an event
Boolean
Method that lets you specify an event handler for an event
function call
Method that lets you specify an event handler for an event
scope
Method that lets you specify an event handler for an event
floating-point
Method that lets you specify an event handler for an event
falsy
Method that lets you specify an event handler for an event
postfix operator
Method that lets you specify an event handler for an event
operator precedence
Method that lets you specify an event handler for an event
innerHTML
The code that invokes a named function
addEventListener()
The code that invokes a named function
function definition
The code that invokes a named function
Boolean
The code that invokes a named function
function call
The code that invokes a named function
scope
The code that invokes a named function
floating-point
The code that invokes a named function
falsy
The code that invokes a named function
postfix operator
The code that invokes a named function
operator precedence
The code that invokes a named function
innerHTML
A property whose value is the content between an element's opening and closing tags
addEventListener()
A property whose value is the content between an element's opening and closing tags
function definition
A property whose value is the content between an element's opening and closing tags
Boolean
A property whose value is the content between an element's opening and closing tags
function call
A property whose value is the content between an element's opening and closing tags
scope
A property whose value is the content between an element's opening and closing tags
floating-point
A property whose value is the content between an element's opening and closing tags
falsy
A property whose value is the content between an element's opening and closing tags
postfix operator
A property whose value is the content between an element's opening and closing tags
operator precedence
A property whose value is the content between an element's opening and closing tags
innerHTML
A number that contains decimal places or that is written in exponential notation
addEventListener()
A number that contains decimal places or that is written in exponential notation
function definition
A number that contains decimal places or that is written in exponential notation
Boolean
A number that contains decimal places or that is written in exponential notation
function call
A number that contains decimal places or that is written in exponential notation
scope
A number that contains decimal places or that is written in exponential notation
floating-point
A number that contains decimal places or that is written in exponential notation
falsy
A number that contains decimal places or that is written in exponential notation
postfix operator
A number that contains decimal places or that is written in exponential notation
operator precedence
A number that contains decimal places or that is written in exponential notation
innerHTML
A value treated in comparison operations as the Boolean value false
addEventListener()
A value treated in comparison operations as the Boolean value false
function definition
A value treated in comparison operations as the Boolean value false
Boolean
A value treated in comparison operations as the Boolean value false
function call
A value treated in comparison operations as the Boolean value false
scope
A value treated in comparison operations as the Boolean value false
floating-point
A value treated in comparison operations as the Boolean value false
falsy
A value treated in comparison operations as the Boolean value false
postfix operator
A value treated in comparison operations as the Boolean value false
operator precedence
A value treated in comparison operations as the Boolean value false
innerHTML
Placed after a variable
addEventListener()
Placed after a variable
function definition
Placed after a variable
Boolean
Placed after a variable
function call
Placed after a variable
scope
Placed after a variable
floating-point
Placed after a variable
falsy
Placed after a variable
postfix operator
Placed after a variable
operator precedence
Placed after a variable
innerHTML
Can be either global or local
addEventListener()
Can be either global or local
function definition
Can be either global or local
Boolean
Can be either global or local
function call
Can be either global or local
scope
Can be either global or local
floating-point
Can be either global or local
falsy
Can be either global or local
postfix operator
Can be either global or local
operator precedence
Can be either global or local
innerHTML
A logical value of true or false
addEventListener()
A logical value of true or false
function definition
A logical value of true or false
Boolean
A logical value of true or false
function call
A logical value of true or false
scope
A logical value of true or false
floating-point
A logical value of true or false
falsy
A logical value of true or false
postfix operator
A logical value of true or false
operator precedence
A logical value of true or false
innerHTML
The lines that make up a function
addEventListener()
The lines that make up a function
function definition
The lines that make up a function
Boolean
The lines that make up a function
function call
The lines that make up a function
scope
The lines that make up a function
floating-point
The lines that make up a function
falsy
The lines that make up a function
postfix operator
The lines that make up a function
operator precedence
The lines that make up a function
innerHTML
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
23
Placing a parameter name within the parentheses of a function definition is the equivalent of declaring a new ____________________ .
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
24
The variables or values that you place in the parentheses of a function call statement are called ____ .

A)string operators
B)primitive types
C)arguments
D)event listeners
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
25
What is the relationship between Boolean values, truthy values, and falsy values?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
26
Which arithmetic operators have the highest precedence?

A) * / %
B) < <=
C) &&
D) + -
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
27
Explain what logical operators are, and then list the 3 JavaScript logical operators and explain what each does.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
28
A(n)____________________ operator requires an operand before and after the operator.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
29
What are the differences between using a the increment and decrement unary operators as prefix operators versus using them as postfix operators?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
30
Function statements are contained within the function ____.

A)parameters
B)braces
C)arguments
D)parentheses
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
31
Sending arguments to the parameters of a called function is called ____________________ arguments.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
32
What is the difference between the operation of the + operatorwith numbers and with strings? Provide an example of each, including the results.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
33
A(n)____________________ type is the specific category of information that a variable contains.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
34
Operator precedence is the system that determines the order in  which operations in an expression are evaluated.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
35
Define variable scope, and describe the two types of variable scope and how you create each.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
36
JavaScript supports five primitive data types. Name and describe these types.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
37
Which of the following is a logical operator?

A)++
B)()
C)==
D)||
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
38
What are the advantages of using the addEventListener()method instead of the other two methods to specify an event handler?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
39
Which of the following is a falsy value?

A)true
B)-1
C)0
D)1
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
40
Describe the two types of functions and explain when you'd use each type.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
41
What is a browser console and how is it useful for a web developer?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 41 flashcards in this deck.