Unit 2 Flashcards

1
Q

What does the “sum” refer to?

A

addition

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

What does the “difference” refer to?

A

subtraction

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

What does “product” refer to?

A

multiplication

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

what does “quotient” refer to?

A

division

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

What is another word for the result of division?

A

quotient

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

What is another word for the result of multiplication?

A

product

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

What is another word for the result of addition?

A

sum

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

What is another word for the result of subtraction?

A

difference

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

2 + 2 = 4

Four is the “__”

A

sum

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

2 - 1 = 1

One is the “__”

A

difference

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

2 * 3 = 6

Six is the “__”

A

product

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

2 / 4 = 2

Two is the “__”

A

quotient

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

What is “Assignment”?

A

Assignment is setting a variable to a value and telling the computer the value’s type.

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

How is a Number declared?

A

By not using quotes.

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

True or False

A number is declared by using quotes.

A

False.
A number is declared by not using quotes.
var numberTwo = 2;

var numberTwo = “2”; <– is a string

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

How is a string declared?

A

A string is declared by using quotes.

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

True or False

A string is declared by NOT using quotes.

A

False.

A string is declared by using quotes.

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

What is an example of the Simple Assignment operator in JavaScript?

A
The equal sign  =
var count = 10;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

True or False:

This is a string.

A

False, there are no quotes.

“This is a string.”

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

True or False:

“This is a string.”

A

True.

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

True or False:
This is a Number:
“456”

A

False that is a string.
This is a number
456

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

In math, what does additive mean?

A

Additive refers to both addition and subtraction.

Subtraction is just adding with negative numbers

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

True or False:

Additive only refers to addition in Math.

A

False:
Additive refers to both addition and subtraction.
(Subtraction is just adding with negative numbers)

24
Q

True or False:

The + sign is also used for concatenation of strings.

A

The plus sign (+) is also used for concatenation (definition), or combining string to form a new longer string.

25
Q

What is the modulo operator?

A

%

26
Q

True or False:

When you divide a number by a sting JavaScript will convert the strings to numbers, if it can.

A

True.

27
Q

True or False:

When you divide a number by a sting JavaScript will not convert the strings to numbers.

A

False. It will if it can.

28
Q

What does the modulo operator do?

A

The modulo operator gives you the remainder when you divide two numbers.

3/10 = 9
has a remainder of 1.

29
Q

What are the equality operators?

A

== test to see if two expressions are equal, converts types to match before it does the equality test
!= test to see if two expressions are not equal, converts types to match before it checks to see if the values are “not” equal, if the values are “not” equal, it will answer TRUE
=== test to see if two expressions are “really” equal, Does not do any conversions
Course standard to use this unless directed to do otherwise
!== test to see if two expressions are “really not” equal, tests for inequality without conversion

30
Q

How many equality operators are there?

A

4.
== test to see if two expressions are equal, converts types to match before it does the equality test
!= test to see if two expressions are not equal, converts types to match before it checks to see if the values are “not” equal, if the values are “not” equal, it will answer TRUE
=== test to see if two expressions are “really” equal, Does not do any conversions
Course standard to use this unless directed to do otherwise
!== test to see if two expressions are “really not” equal, tests for inequality without conversion

31
Q

Which equality operators converts types to match before checking values against each other?

A

== and !=

!= test to see if two expressions are not equal
converts types to match before it checks to see if the values are “not” equal
if the values are “not” equal, it will answer TRUE

== test to see if two expressions are equal
converts types to match before it does the equality test

32
Q

Which two equality operators do not convert types to match before checking against each other?

A

=== and !==

=== test to see if two expressions are “really” equal
Does not do any conversions
Course standard to use this unless directed to do otherwise
!== test to see if two expressions are “really not” equal
tests for inequality without conversion

33
Q

What is a boolean expression?

A

True or false statements

34
Q

Statements that are either true or false are called:

A

Boolean Expression

35
Q

What is the following statement saying?
document.write(“Bob” != “Bill”);
True

A

“Bob” is not equal to “Bill”

36
Q

What is the following statement saying?

document.write(100 === “100”);
false

A

100 (number) is equal to “100” (string)

Prints false as the number and string are not equal and as === does not do conversions a number and string are different.

37
Q

True or False:
It is course standard to use:
=== and !== whenever possible?

A

True.

38
Q

True or False:
It is course standard to use:
== and != whenever possible?

A

False you want to use:

=== and !==

39
Q

What are the relational operators?

A

< Less Than
> Greater Than
= Greater Than or Equal To

40
Q

How many relational operators are there?

A

4

41
Q

What is:

<

A

Less than

42
Q

What is:

>

A

Greater than

43
Q

What is:

<=

A

Less than or equal to

44
Q

What is:

>=

A

Greater than or equal to

45
Q

What are Unary Operators?

A

Unary means that there is only one variable or value involved with the operator.

46
Q

How many Unary Operators?

A

3
++ Increments a number by 1
– Decrements a number by 1
typeof Returns a string representing the data type

47
Q

What does this Unary Operator do?

++

A

Increments a number by 1

48
Q

What does this Unary Operator do?

A

Decrements a number by 1

49
Q

What does this Unary Operator do?

typeof

A

Returns a string representing the data type

50
Q

How do you use the typeof Unary Operator?

A

document.write(typeof(variableNameHere));

51
Q

How many Compound Assignment Operators are there?

A
4
\+= add to a variable
-+ subtract to a variable
*= Multiply into a variable
/= Divide into a variable
52
Q

What does this Compound Assignment Operator do?

+=

A

+= add to a variable

53
Q

What does this Compound Assignment Operator do?

-+

A

-+ subtract to a variable

54
Q

What does this Compound Assignment Operator do?

*=

A

*= Multiply into a variable

55
Q

What does this Compound Assignment Operator do?

/=

A

/= Divide into a variable