JavaScript Function bind() methodThe JavaScript Function bind() method is used to create a new function. When a function is called, it has its own this keyword set to the provided value, with a given sequence of arguments. SyntaxParameterthisArg - The this value passed to the target function. arg1,arg2,....,argn - It represents the arguments for the function. Return ValueIt returns the replica of the given function along provided this value and initial arguments. JavaScript Function bind() method ExampleExample 1Let's see a simple example of bind() method. Test it NowOutput: Javatpoint Example 2Let's see an example of bind() method. Test it NowOutput: Javatpoint Oracle Javatpoint Next TopicJavaScript Function |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India