JavaScript Methods Flashcards

1
Q

Why do we log things to the console?

A

To test and debug the code we are working on

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

What is a method?

A

It is a function that is a property of an object

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

Methods are used to called on objects

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

Using the pop() method

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

Using the Math.floor() method

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

How do you delete an element from an array?

A

Using the splice() method

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

How do you append an element to an array?

A

Using the push() method

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

How do you break a string up into an array?

A

Using the split() method on the string

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

Do string methods change the original string? How do you check if you weren’t sure?

A

No, it does not affect the original string, you can check by using the console.log on the original string

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

Roughly how many string methods are there according to the MDN web docs?

A

Roughly about 36 to 40 methods

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

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

A

No, not every return value will be used in every situation

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

Roughly how many array methods are there according to the MDN web docs?

A

Roughly about 36 to 40 methods

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

What three-letter acronym should you always include in your Google search about a JavaScript method or CSS property?

A

The MDN web docs

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