In this webinar learn 3 most important concepts of JavaScript. How to calculate the value of 'this' inside a function All about object literals function constructors and prototypes https://www.youtube.com/watch?v=F2V7MgehDSY
constructor
Why use new.target inside a function in JavaScript – Simplified
There are four invocation patterns in JavaScript, which means you can call a function in four possible ways. They are, Function Invocation PatternConstructor Invocation PatternMethod Invocation PatternIndirect Invocation Pattern Essentially, these four-invocation patterns determine the value of ‘this’ object inside a function. Let us consider the function created below, function add(num1, num2) { console.log(this); // global object } let a = add(8, 9); In the … Continue reading Why use new.target inside a function in JavaScript – Simplified