Try Magic Notes and save time.Try it free
Try Magic Notes and save timeCrush your year with the magic of personalized studying.Try it free

JavaScript, ES6, OOP Interview Questions

Get a hint
What is a JavaScript Closure
Click the card to flip 👆
1 / 43
1 / 43
Terms in this set (43)
Functional programming involves using pure functions that avoid shared state, mutating data, and side-effects. It is declarative, rather than imperative.

Rather than using functions to mutate a variable, functions take the value of the variable as a new variable and return a mutated version of the new variable. This allows the original variable to remain unchanged.
Synchronous code equates to 'blocking'. Blocking is basically slowing down code by not allowing the call stack (order of events) to continue until a slow 'block' is complete.

Asynchronous code uses callbacks to avoid blocking the call stack by threading the callback out to an api and then adding them to the callback stack once the api has finished the computation. The callback stack waits to be added to the call stack until the call stack is empty.