Important Javascript Interview Questions
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.
- What is hoisting? Explain with example?
- What is closure in javascript?
- What is prototype?
- How many ways are there to create objects in javascript?
- What are different data types in javascript?
- What is difference between var, let & const?
- What is IIFEs(Immediately Invoked Function Expression)?
- What is arrow function ?
- What are promises in js? What is the difference between promises & callbacks?
- What are async & differ in javascript?
- Do you know event loop in javascript?
- Do you know template literals in javascript?
- What is ‘use strict’?
- Difference between undefined & null?
- What are event bubbling & event capturing?
- Do you know about babel?
- What are classes in ES6 & how it is different from constructor function we write in ES5?
- How to empty an array in javascript?
- What is the difference between == & === ?
- What are call, bind & apply in js?
- Explain this in js?
- 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);
- 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)
- 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