JavaScript Function call()

With the call() method, you can write a method that can be used on different objects. In JavaScript all functions are object methods.

Code :