JavaScript Function Apply

You can write apply() method that can be used on different objects. The apply() and call() methods are similar.

Code :