Deck 2: Working With Functions Data Types and Operators

ملء الشاشة (f)
exit full mode
سؤال
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
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
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
سؤال
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
سؤال
Data types that can be assigned only a single value are called ____ types.

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

A) value separator
B) equals comparison
C) assignment operator
D) declaration operator
سؤال
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
سؤال
Parentheses are used with expressions to change the associativity with which individual operations in an expression are evaluated.
سؤال
A logical operator is used to compare two string operands for equality.
سؤال
In JavaScript code, you use the words yes and no to indicate Boolean values.
سؤال
The strict equal operator is ____.

A) =
B) ==
C) ===
D) !=
سؤال
A(n)____ is a variable that is used within a function.

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

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

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

A) static typed
B) loosely typed
C) strongly typed
D) numeric typed
سؤال
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 literal string can be assigned a zero-length string value called a(n)____ string.

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

A) !=
B) ||
C) &&
D) ===
سؤال
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(n)____________________ variable is declared inside a function and is available only  within the function in which it is declared.
سؤال
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
سؤال
Placing a parameter name within the parentheses of a function definition is the equivalent of declaring a new ____________________ .
سؤال
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
سؤال
What is the relationship between Boolean values, truthy values, and falsy values?
سؤال
Which arithmetic operators have the highest precedence?

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

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

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

A)true
B)-1
C)0
D)1
سؤال
Describe the two types of functions and explain when you'd use each type.
سؤال
What is a browser console and how is it useful for a web developer?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/41
auto play flashcards
العب
simple tutorial
ملء الشاشة (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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
7
Parentheses are used with expressions to change the associativity with which individual operations in an expression are evaluated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
8
A logical operator is used to compare two string operands for equality.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
9
In JavaScript code, you use the words yes and no to indicate Boolean values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
10
The strict equal operator is ____.

A) =
B) ==
C) ===
D) !=
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
11
A(n)____ is a variable that is used within a function.

A) method
B) property
C) parameter
D) operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
12
The ____ operator executes one of two expressions based on the results of a conditional expression.

A) .
B) ()
C) ,
D) ?:
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
14
An anonymous function is a set of related statements that is assigned a name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
15
JavaScript is a ____ programming language.

A) static typed
B) loosely typed
C) strongly typed
D) numeric typed
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
18
A comparison operator is used to compare two operands and determine if one numeric value is greater than another.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
19
The And operator is ____.

A) !=
B) ||
C) &&
D) ===
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
21
A(n)____________________ variable is declared inside a function and is available only  within the function in which it is declared.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
23
Placing a parameter name within the parentheses of a function definition is the equivalent of declaring a new ____________________ .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
25
What is the relationship between Boolean values, truthy values, and falsy values?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
26
Which arithmetic operators have the highest precedence?

A) * / %
B) < <=
C) &&
D) + -
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
27
Explain what logical operators are, and then list the 3 JavaScript logical operators and explain what each does.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
28
A(n)____________________ operator requires an operand before and after the operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
30
Function statements are contained within the function ____.

A)parameters
B)braces
C)arguments
D)parentheses
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
31
Sending arguments to the parameters of a called function is called ____________________ arguments.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
33
A(n)____________________ type is the specific category of information that a variable contains.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
34
Operator precedence is the system that determines the order in  which operations in an expression are evaluated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
35
Define variable scope, and describe the two types of variable scope and how you create each.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
36
JavaScript supports five primitive data types. Name and describe these types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
37
Which of the following is a logical operator?

A)++
B)()
C)==
D)||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
38
What are the advantages of using the addEventListener()method instead of the other two methods to specify an event handler?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
39
Which of the following is a falsy value?

A)true
B)-1
C)0
D)1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
40
Describe the two types of functions and explain when you'd use each type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
41
What is a browser console and how is it useful for a web developer?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.