General Flashcards

(4 cards)

1
Q

.pop method

A

Array method

Takes the last element of the array the method is called on and returns it

Const array = [1,2,3]

Return Array.pop()

3

If called on an empty array, returns undefined

This method mutates the array by removing the last element

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

Set data structure

A

Iterable object where no 2 values are the same

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

Difference between do while and while loop

A

Do while
Code block is executed then the condition is checked

While
Condition is checked before the code block is executed

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

Do while loop

A
Do { 
Let row = []
Grid.push(row) 
}
While (gird.length < 3)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly