Basics Flashcards

1
Q

List all 8 datatypes in javascript

A

Number, String, Object, null, undefined, boolean, bigint, symbol

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

largest value of number data type in javascript(both +ve and -ve)

A

2^53 - 1 — about 9 quadrillion

-(2^53 - 1)

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

special values in number datatype

A

Nan, Infinity, -Infinity

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

is there a % operation in javascript?

A

yes

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

this primitive data type does not exist in javascript

A

character

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

typeof(null) = ?

why does this happen?

A

object

null is not of object type, it is just what typeof returns when its operator is null

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

what is the functionality of having a modal on the webpage?

A

to stop all interactions(clicks, textareas, etc) till user has interacted with modal.

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

Number(“a string that can’t be converted to a number”)

A

NaN

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

These are the methods used to perform String, Number, and Boolean conversions

A

String(), Number(), Boolean()

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

Boolean(“0”) = ?

A

true

It is a non-empty string.

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

These values on Boolean conversion become false.

A

NaN, “”, null, undefined, 0

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

This is the only arithmetic operator that converts number operands to string operands,

A

+

All others convert strings to numbers.

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

This operator does the same thing as Number() conversion method

A

unary + method.

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

the alert function returns value of this type

A

undefined

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

switch case uses strict comparison ===. True/False ?

A

True

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

a function without return statement returns this value

A

undefined