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
2
Q
Set data structure
A
Iterable object where no 2 values are the same
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
4
Q
Do while loop
A
Do { Let row = [] Grid.push(row) } While (gird.length < 3)