Saturday, January 22, 2022

JavaScript: The Good Parts

Closure

An inner or nested function can reference variables in its outer functions, even after the outer function has exited, such as when the outer function returns the inner function.

Currying

A function is given some arguments and returns a function that will be passed the rest of the arguments later. This has two benefits: complex arguments can be calculated once and stored, and the number of arguments is reduced.

Memoization

I just call this caching the function result in a Dictionary.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.