Function call() Method


/ Published in: JavaScript
Save to your folder(s)

This method allows you to call a function as a method of another object. The first argument the call method expects is the object it is to operate on. Any others are part of the function. Note how the this keyword now refers to the comp object, so a result property is created inside comp.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.