Front End Developer Interview Questions

12,596 front end developer interview questions shared by candidates

What this this & self was the question. var myObject = { foo: "bar", func: function() { var self = this; console.log("1outer func: this.foo = " + this.foo); console.log("1outer func: self.foo = " + self.foo); var baz = (() => { debugger; console.log("2inner func baz: this.foo = " + this.foo); // myObject console.log("2inner func baz: self.foo = " + self.foo); // myObject }); (function() { debugger; console.log("3inner func: this.foo = " + this.foo); // undefined console.log("3inner func: self.foo = " + self.foo); // myObject }()); return baz; } };
avatar

Front End Developer

Interviewed at Disney+ Hotstar

3.5
Oct 16, 2019

What this this & self was the question. var myObject = { foo: "bar", func: function() { var self = this; console.log("1outer func: this.foo = " + this.foo); console.log("1outer func: self.foo = " + self.foo); var baz = (() => { debugger; console.log("2inner func baz: this.foo = " + this.foo); // myObject console.log("2inner func baz: self.foo = " + self.foo); // myObject }); (function() { debugger; console.log("3inner func: this.foo = " + this.foo); // undefined console.log("3inner func: self.foo = " + self.foo); // myObject }()); return baz; } };

Viewing 1921 - 1930 interview questions

Glassdoor has 12,596 interview questions and reports from Front end developer interviews. Prepare for your interview. Get hired. Love your job.