Language concepts

Partial application

Try the free JavaScript compiler

Fixes selected arguments for later reuse; bind fixes leading arguments and receiver, while closures can fix other positions.

Formal Syntax & Structure

javascript syntaxjavascript
const p = fn.bind(null, firstArg)

Working Example

Example Snippetjavascript
const f=(a,b,c)=>a+b+c;console.log(f.bind(null,2)(3,4));
JavaScript Reference