Master JavaScript ‘this’ in 30 Mins

Do you know, there are four ways to calculate the value of 'this' inside a JavaScript function?  Some pointers about 'this'  Every function has it's own 'this' An arrow function does not have it's own 'this'The value of 'this' depends on, how that function is called. The value of 'this does not depend on how the function … Continue reading Master JavaScript ‘this’ in 30 Mins

Video- Why You need the apply() and the call() methods in JavaScript

To pass value of 'this' object in a function apply and the call methods are used. https://youtu.be/1nG3FKN3KjU   The apply() and the call() methods are used to call a function indirectly. When you call a function using the apply() and the call() methods, that is called Indirect Invocation Pattern . The first parameter is always … Continue reading Video- Why You need the apply() and the call() methods in JavaScript

What are the Call and Apply Methods in JavaScript

Read full article on the Infragistics blog In JavaScript, the apply() and call() methods execute a function in the context (scope) of the first argument you pass to them. Let’s take a look at them in action to learn more. Say that you have an object person as shown below: https://gist.github.com/debugmodedotnet/11ca4e8d58e602ca93813cef93d9601e And in addition, you have a … Continue reading What are the Call and Apply Methods in JavaScript