Variables & DataTypes Flashcards

1
Q

Which datatype is this?

“Hello”

A

String

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

Which datatype is this?

42

A

Number, and in the category Number it’s an integer

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

Which datatype is this?

true

A

Boolean

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

Which datatype is this? And what is inside?

[‘hey’, ‘hello’, ‘hi’]

A

Array of strings

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

Which datatype is this? And what is inside?

[1, 2, 3]

A

Array of integers/numbers

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

Which datatype is this?

4.05

A

Number, and in the category Number it’s a float.

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

Is het: const, let of var?

“the identifier can not be reassigned”

A

const

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

Is het: const, let of var?

“I am looking at code that was written before ES6 came out”

A

var

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

Is het: const, let of var?

“the identifier can be overwritten”

A

let

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

Which datatype is this?

false

A

Boolean

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

Which datatype is this?

{greeting: “hello”}

A

Object with 1 property

The key is greeting and the value “hello”.
The value is a String.

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

Which datatype is this?

{
greeting: “hello”,
arrayWithNumbers: [1,2,3]
}

A

Object with 2 properties.

2 keys: greeting and arrayWithNumbers
the value of greeting is a String.
the value of arrayWithNumber is an Array.

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

Wat is de index van de first item of an Array?

A

The first index is 0

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

Hoe kun je het aantal items in een Array zien?

A

de .length property, voorbeeld: myArray.length

dit is een property van de Array en heeft daarom geen haken aan het einde

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

Hoe kun je een item toevoegen aan een Array?

A

De push method, voorbeeld: myArray.push(item)

dit is een array method, met andere worden in de kern is het een functie, daarom zijn hier ronde haken () aanwezig.

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