Concepts

Bound function

Try the free JavaScript compiler

Callable created by bind. Ordinary calls forward stored receiver and combined arguments. If the target is constructible, new forwards construction without the stored receiver.

Formal Syntax & Structure

javascript syntaxjavascript
const bound = target.bind(receiver, ...leadingArgs)

Working Example

Example Snippetjavascript
function Item(n){this.n=n;} const Bound=Item.bind({n:99},7);console.log(new Bound().n);
JavaScript Reference