Sign in

Call() Method in JavaScript

“ lets us understand the use of call( ) in javascript ”

image of javascript

Call( ) method is used for using methods of one object in other object

Now how to use print() method of obj1 in obj2 ?

To use print method of obj1 in obj2 we use call() method

now lets see how to pass arguments in call() method

Syntax : obj.method().(obj,arguments)