What is the difference between scope and context in javascript

Published: 22 October 2014
on channel: Kevin Chisholm
16,898
306

In JavaScript, scope and context are not the same thing at all. It is important to understand the difference between them. Fortunately, the answer is fairly short and simple:

Scope pertains to the visibility of variables, and context refers to the object to which a method belongs (which can be changed by using call or apply).

Read the full Blog Post here: http://blog.kevinchisholm.com/javascr...