Many a times we get confused with scope in JavaScript, So here I am going to put some light on scope. There are two types of scope in JavaScript. First one is, function scope which is also called as local scope, and second one is global scope. Function Scope: In JavaScript, variables are defined with function scope instead of block...
There are four patterns of invocation in JavaScript: 1. The method invocation pattern. 2. The function invocation pattern. 3. The constructor invocation pattern. 4. The apply invocation pattern. 1. The Method Invocation Pattern: When a function is stored as a property of an object, we call it a method. When a method is invoked,...