Lead Front End Developer Interview Questions

16,903 lead front end developer interview questions shared by candidates

5. var x; (function test() { console.log('x --'+ x); })(); //this is self invoking so print undefine because x is not assigned any value yet var y = function() { console.log('In y' + x); //function is not called from anywhere so this wont execute } another(); //this will call function another written below var x = 10; console.log(x); //will print 10 because x is assigned value 10 function another() { console.log(x); //will print undefine because x is not assigned any value yet }
avatar

Front End Developer

Interviewed at ServiceNow

4.1
Jul 29, 2020

5. var x; (function test() { console.log('x --'+ x); })(); //this is self invoking so print undefine because x is not assigned any value yet var y = function() { console.log('In y' + x); //function is not called from anywhere so this wont execute } another(); //this will call function another written below var x = 10; console.log(x); //will print 10 because x is assigned value 10 function another() { console.log(x); //will print undefine because x is not assigned any value yet }

3. What will be the console.log statements print const obj = { name: 'Billy', sing: function () { this.age = "20" console.log('a' , this); var anotherFunction = function() { this.age = "30" console.log('b', this); } anotherFunction(); } } obj.sing(); //first console will print properties of obj(name, age and sing) and second will print window object
avatar

Front End Developer

Interviewed at ServiceNow

4.1
Jul 29, 2020

3. What will be the console.log statements print const obj = { name: 'Billy', sing: function () { this.age = "20" console.log('a' , this); var anotherFunction = function() { this.age = "30" console.log('b', this); } anotherFunction(); } } obj.sing(); //first console will print properties of obj(name, age and sing) and second will print window object

Viewing 2741 - 2750 interview questions

Glassdoor has 16,903 interview questions and reports from Lead front end developer interviews. Prepare for your interview. Get hired. Love your job.