Quiz Flashcards

1
Q

5 + “34”

A

534

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

5 - “4”

A

1 *This occurs because js can add strings together for eg.) “hello” + “world” would be “helloworld” but you can’t subtract a string from a string. “hello” - “bye” would result in a NaN.
So js converts the stringed number into a number whereas when you’re adding a number to a stringed number, js would convert the number into a string.

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

10 % 5

A

0

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

5 % 10

A

5

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

” “ + “ “

A

” “

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

” “ + 0

A

” 0”

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

3 - 4

A

-1

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

“bob” - “bill”

A

NaN

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

5 >= 1

A

true

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

0 === 1

A

false

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

4 <= 1

A

false

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

1 != 1

A

false

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

“A” > “B”

A

false

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

“B” < “C”

A

true

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

“a” > “A”

A

true

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

“b” < “A”

A

false

17
Q

true === false

A

false

18
Q

true != true

A

false

19
Q
// Evaluate this question. What is a + b?
var a = 34;
var b = 21;
a = 2;
a + b // what is the answer here?
// What is c equal to?
var c; undefined
A

a + b = 23

c = undefined