JavaScript Flashcards

1
Q

Lines of code that Javascript will intentionally ignore.

A

Comments

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

In computer science, what is data?

A

Anything that is meaningful to the computer

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

How many different data types does Javascript have?

A

7

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

What does string mean?

A

Any sort of text

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

What is number?

A

A number

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

What is undefined?

A

Something that hasn’t been defined

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

What is null?

A

Nothing

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

What is a boolean?

A

True or false

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

Symbol

A

An immutable primitive value that is unique

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

What is an object?

A

Stores a lot of different key value pairs

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

Where do you set data?

A

Into a variable

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

What does a variable allow computers to do to data?

A

Store and manipulate it in dynamic fashion

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

How do you declare a variable?

A

var keyword

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

What is it common to set something to?

A

A string

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

How many ways can you declare a variable?

What are they?

A

3

Var, let, const

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

Where can var be used?

A

Throughout the entire program

17
Q

Where can let be used?

A

Within the scope of where you declared it

18
Q

What is const?

A

A variable that can never change

19
Q

What happens if you try to change a const?

20
Q

What is the equal sign?

A

Assignment operator

21
Q

How do you assign a variable?

A

var (blank);

22
Q

Why should you use a semicolon?

A

So you know where the end of the line is

23
Q

var b = 2;

What does this line mean?

A

2 is being assigned to B.

24
Q

How would you assign 7 to a?

25
What does console.log do?
Allows you to see things in the console
26
What does uninitialised mean?
The value is undefined and we have not set it to anything
27
Variable names and function names in JS are what?
Case sensitive
28
What does increment a number mean?
To add 1 to it
29
What is a quicker way to increment a number?
myVar++
30
What are decimals referred to in JS?
Floats
31
What does hard coding mean?
Putting something into your source code
32
What is JavaScript?
Allows you to store and manipulate data (what you see on a website)
33
What does osm stand for?
Open street map
34
What is a style tag?
It’s how you control the format of what things look like
35
How does JSON Parse work?
It takes the data that’s in text format and converts it to a JavaScript
36
What is JSON?
JavaScript Object Notation and is an open standard data interchange format