javascript Flashcards
what does strict mode do
promotes error detection
var
creates global variables
let
creates local variables
const
creates local immutable variables
immutable
cannot be changed once created
===
strict equality
what is the difference between strict comparison and regular comparison
strict will compare the values as well as the types
asynchronous programming
starts executing code then moves onto the next thing
synchronous programming
waits till the first set of code is executed before executing the next
callback
asynchronous programming; a function passed to another that will be executed sometime later
ensures that the program doesnt wait until another task has been completed
what does a lambda function look like
(parameters) => {implementation};
what is the symbol for a lambda function
=>
de-structuring
expanding an array or object to variables
what does it look like to de-structure an array
const variables = [ 1, 2, 3, 4 ];
[a,b, …rest] = variables;
a=1, b=2, rest = [3,4]