Skip to content

Instantly share code, notes, and snippets.

@kutyel
Last active November 15, 2018 13:47
Show Gist options
  • Save kutyel/30e0b8d1e77ae1ecb39cb85d6cb74edb to your computer and use it in GitHub Desktop.
Save kutyel/30e0b8d1e77ae1ecb39cb85d6cb74edb to your computer and use it in GitHub Desktop.
JavaScript Star Q/A 🌟

Typical JS Interview Questions

What is a Closure?

Closure is when a function "remembers" its lexical scope even when the function is executed outside that lexical scope. (IMO: just a stupid function returning another partially applied function).

What is Hoisting?

Variable and function declarations are put into memory during the compile phase, but stays exactly where you typed it in your coding. There is no physically lifting to the top of the file at all.

How are currying and partial application alike?

They are both techniques to specialise generalised functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment