Results 1 - 14 of 14

Functions

Generally speaking, a function is a "subprogram" that can be called by code external (or internal in the case of recursion) to the function. Like the program itself, a function is composed of a sequence of statements called the function body. Values can be passed to a function, and the function will return a value.
Function Functions JavaScript

Arguments object

The arguments object is an Array-like object corresponding to the arguments passed to a function.
arguments Functions JavaScript

arguments.length

The arguments.length property contains the number of arguments passed to the function.
arguments Functions JavaScript Property

Default parameters

Default function parameters allow formal parameters to be initialized with default values if no value or undefined is passed.
ECMAScript6 Functions JavaScript

getter

The get syntax binds an object property to a function that will be called when that property is looked up.
ECMAScript5 ECMAScript6 Functions JavaScript

setter

The set syntax binds an object property to a function to be called when there is an attempt to set that property.
ECMAScript5 Functions JavaScript

Expression closures

Expression closures are a shorthand function syntax for writing simple functions.
Functions JavaScript Reference

Functions

Functions are one of the fundamental building blocks in JavaScript. A function is a JavaScript procedure—a set of statements that performs a task or calculates a value. To use a function, you must define it somewhere in the scope from which you wish to call it.
Beginner beginner Functions Guide JavaScript

arguments[@@iterator]()

The initial value of the @@iterator property is the same function object as the initial value of the Array.prototype.values property.
arguments Deprecated Functions JavaScript Property

arguments.callee

The arguments.callee property contains the currently executing function.
arguments Deprecated Functions JavaScript Property

arguments.caller

The obsolete arguments.caller property used to provide the function that invoked the currently executing function. This property has been removed and no longer works.
arguments Functions JavaScript Obsolete Property

Arrow functions

An arrow function expression has a shorter syntax compared to function expressions and lexically binds the this value (does not bind its own thisargumentssuper, or new.target). Arrow functions are always anonymous. These function expressions are best suited for non-method functions and they can not be used as constructors.
ECMAScript6 Functions Intermediate JavaScript Reference

Method definitions

Starting with ECMAScript 2015 (ES6), a shorter syntax for method definitions on objects initializers is introduced. It is a shorthand for a function assigned to the method's name.
ECMAScript6 Functions JavaScript Object Syntax

Rest parameters

The rest parameter syntax allows us to represent an indefinite number of arguments as an array.
Functions JavaScript Rest Rest parameters