🍄function

🚧 under construction -> named function

JSvalueobject ⟩ function

an object that can be called (supports the [[Call]] internal method).

// function declarations
function  f() { ... }          // normal function
function* f() { ... }          // generator function
async function  f() { ... }    // async function
async function* f() { ... }    // async generator function

every function

In JavaScript, function arguments are always passed by value. (values of the variables are copied into the function arguments)

👉 JavaScript Tutorial » Understanding JavaScript Pass-By-Value

a closure (or IIFE) can be used to create a scope to hide variables/functions.

A "variable" is just a property of the environment record (associated with the currently executing block /function /module /script).

Last updated