Deck 2: Working With Functions Data Types and Operators
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Match between columns
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/41
Play
Full screen (f)
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) 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
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
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
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
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
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) !=
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
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) ?:
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
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
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
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
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) ===
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
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
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
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) + -
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
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)||
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
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