Javascript Methods Flashcards

1
Q

Why do we log things to the console ?

A

Debugging and inspecting variables in the browser

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

What is a method ?

A

Functions stored as object properties

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

How is a method different from any other function ?

A

It is an object property that has a function value

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

How do you remove the last element from an array ?

A

pop()

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

How do you round a number down to the nearest integer ?

A

Math.round()

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

How do you generate a random number ?

A

Math.random()

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

How do you delete an element from an array ?

A

splice()

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

How do you append an element to an array ?

A

push()

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

How do you break a string up into an array ?

A

split()

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

Do string methods change the original string? How would you check ?

A

No they don’t. You can check by calling the variable in the console

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

Roughly how many string methods exist?

A

52

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

Is the return value of a function method useful in every situation ?

A

Not in every situation

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

Roughly how many array methods are there ?

A

45

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

What three-letter acronym should you always include in your google searches about a Javascript or CSS property ?

A

MDN

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