JavaScript Flashcards

1
Q

array.unshift

A

Adds one or more elements to the beginning of the array, and returns the length of the array.

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

array.shift

A

Removes the first element of the array and returns that element

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

array.push

A

Add item to end of array, and returns length of the array.

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

array.pop

A

Removes and returns the last object in the array.

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

Expression

A

An expression resolves to a value and can be written wherever a value is expected.

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

Statement

A

A statement performs an action.

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

Generator

A

A generator returns an iterator object, that can be used in a for loop. You use ‘yield’ where you want to return a value to the iterating loop, and when the generator is called again, it picks up right after the last yield.

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

Algorithm

A

A sequence of well defined steps that can be executed mechanically. It is guaranteed to finish and produce a correct result.

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