Functions
Widely available
Functions are series of statements that can be called and return a value. The function
keyword (as in function () { }
) and arrow (=>
) expression create functions. The JavaScript functions protocol includes default and rest parameters and binding to this
.
Compatibility
- Chrome 1 Released on 2008-12-11
- Chrome Android 18 Released on 2012-06-27
- Edge 12 Released on 2015-07-29
- Firefox 1 Released on 2004-11-09
- Firefox for Android 4 Released on 2011-03-29
- Safari 1 Released on 2003-06-23
- Safari on iOS 1 Released on 2007-06-29
MDN docs
- Function global object
- Function.Symbol.hasInstance
- Function.Function
- Function.apply
- Function.bind
- Function.call
- Function.length
- Function.name
- Function.toString
- Reference/Functions
- Reference/Functions/arguments
- Reference/Functions/arguments/Symbol.iterator
- Reference/Functions/arguments/length
- Reference/Functions/Arrow_functions
- Reference/Functions/Default_parameters
- Reference/Functions/get
- Reference/Functions/Method_definitions
- Reference/Functions/rest_parameters
- Reference/Functions/set
- function operator
- function statement
Specifications
- ECMAScript Language Specification, from TC39 (Ecma International).
- ECMAScript Language Specification, from TC39 (Ecma International).
BCD data
- javascript.builtins.Function
- javascript.builtins.Function.@@hasInstance
- javascript.builtins.Function.Function
- javascript.builtins.Function.apply
- javascript.builtins.Function.apply.generic_arrays_as_arguments
- javascript.builtins.Function.bind
- javascript.builtins.Function.call
- javascript.builtins.Function.length
- javascript.builtins.Function.length.configurable_true
- javascript.builtins.Function.name
- javascript.builtins.Function.name.configurable_true
- javascript.builtins.Function.name.inferred_names
- javascript.builtins.Function.toString
- javascript.functions
- javascript.functions.arguments
- javascript.functions.arguments.@@iterator
- javascript.functions.arguments.length
- javascript.functions.arrow_functions
- javascript.functions.arrow_functions.trailing_comma
- javascript.functions.block_level_functions
- javascript.functions.default_parameters
- javascript.functions.default_parameters.destructured_parameter_with_default_value_assignment
- javascript.functions.default_parameters.parameters_without_defaults_after_default_parameters
- javascript.functions.get
- javascript.functions.get.computed_property_names
- javascript.functions.method_definitions
- javascript.functions.method_definitions.async_methods
- javascript.functions.method_definitions.generator_methods_not_constructable
- javascript.functions.rest_parameters
- javascript.functions.rest_parameters.destructuring
- javascript.functions.set
- javascript.functions.set.computed_property_names
- javascript.operators.function
- javascript.operators.function.trailing_comma
- javascript.statements.function
- javascript.statements.function.trailing_comma_in_parameters