Learn JavaScript practically
and Get Certified.
Reference Materials
Created with over a decade of experience.
Certification Courses
Created with over a decade of experience and thousands of feedback.
Learn JavaScript practically
and Get Certified.
Try Programiz PRO!
Learn JavaScript practically
and Get Certified.
JavaScript Function Object
In JavaScript, functions have properties and methods just like other objects because they themselves are Function
objects.
In this reference page, you will find all methods of a Function
object and its properties. For example, the length property of a function denotes the number of arguments expected by the function.
JavaScript Function toString()
Returns source code of function as a string
Javascript Function.length
Returns the number of parameters of a function
Javascript Function.name
Returns the name of the given function
Javascript Function apply()
calls function with this value and array of args
Javascript Function call()
Calls a function with a given this value and args
JavaScript Function bind()
Creates new function with given this value & args