# Javascript
# First class functions
TIP
- functions can take as arguments other functions
- functions can be returned by functions
- functions can assigned to a variable
# Higher-order functions
TIP
- takes one or more functions as arguments
- returns a function as its result.
# Callback functions
TIP
- Callback function is a function passed into another function as an argument
# Curry functions
TIP
A curried function is a function of several arguments rewritten
such that it accepts the first argument
and returns a function
that accepts the second argument and so on.
Notes: Create By Lodash (opens new window)
# Hoisting
TIP
- Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution.
⭐️ Khank's note
# Closure
TIP
- A closure is the combination of a function bundled together (enclosed)
with references to its surrounding state
(the lexical environment). - Not only Javascript, PHP has this term also.
⭐️ Khank's note
# Duck typing
TIP
If it looks like a duck and quacks like a duck, it's a duck
# Event Loop
🇱 🇴 🇦 🇩 🇮 🇳 🇬
# this, call, bind & apply
🇱 🇴 🇦 🇩 🇮 🇳 🇬
# Prototype
🇱 🇴 🇦 🇩 🇮 🇳 🇬
# Promise, async, await
🇱 🇴 🇦 🇩 🇮 🇳 🇬