Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JavaScript .call()
#calls a function setting the value for 'this' within the function
functionName.call(someThisValue, otherParams);
- the first param passed is the value for 'this' when this is referenced within that function
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment