JavaScript Flashcards
array.unshift
Adds one or more elements to the beginning of the array, and returns the length of the array.
array.shift
Removes the first element of the array and returns that element
array.push
Add item to end of array, and returns length of the array.
array.pop
Removes and returns the last object in the array.
Expression
An expression resolves to a value and can be written wherever a value is expected.
Statement
A statement performs an action.
Generator
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.
Algorithm
A sequence of well defined steps that can be executed mechanically. It is guaranteed to finish and produce a correct result.