Codementor Events

Important Javascript Interview Questions

Published Sep 18, 2019

Below are the important javascript interview questions that you should know if you are planning to give interview as frontend developer, UI developer, web developer.

  1. What is hoisting? Explain with example?
  2. What is closure in javascript?
  3. What is prototype?
  4. How many ways are there to create objects in javascript?
  5. What are different data types in javascript?
  6. What is difference between var, let & const?
  7. What is IIFEs(Immediately Invoked Function Expression)?
  8. What is arrow function ?
  9. What are promises in js? What is the difference between promises & callbacks?
  10. What are async & differ in javascript?
  11. Do you know event loop in javascript?
  12. Do you know template literals in javascript?
  13. What is ‘use strict’?
  14. Difference between undefined & null?
  15. What are event bubbling & event capturing?
  16. Do you know about babel?
  17. What are classes in ES6 & how it is different from constructor function we write in ES5?
  18. How to empty an array in javascript?
  19. What is the difference between == & === ?
  20. What are call, bind & apply in js?
  21. Explain this in js?
  22. What will be the output of below program?
for(var i=0; i<5; i++) {  
 setTimeout(function(){  
 console.log(i);  
 }, 0);  
}

23 . What’s the issue with above program & how you can fix it?

24 . What will be the output of below program?

setTimeout(function(){  
 console.log(2);  
});  
function doSomething() {  
 \* this is a synchronous function which will take 10 secs to run & then will print output of 10 *\
}  
doSomething();  
console.log(3);
  1. What is asynchronous & synchronous in javascript?

26 . What is map, filter & reduce in javascript?

27 . What will be the output of below program?

console.log(1+2+"3")  
console.log("1"+2+3)
  1. What is event delegation in js?

29 . Have you used any framework/library in js?

How many questions you were able to answer? Let me know in the comments 😃

Discover and read more posts from tmtushar28
get started