Select Sidearea

Populate the sidearea with useful widgets. It’s simple to add images, categories, latest post, social media icon links, tag clouds, and more.

[email protected]
+1234567890

May 2020

There are multiple ways "this" is bound in a function. It depends on how function is called: 1. Constructor function var student = function(name, stu_class, score) { this.name = name; this.stu_class = stu_class; this.score = score; console.log(this)} var uniStudent = new student("Smith", "B.Tech.", "8.8");  // It should log student object. 2. Strict mode in function function add20(a) {'use strict'; console.log(this); return a + 20;} add20(100); // It should log undefined. 3. Function without strict mode function add100(a)...

Read More