Saturday 22 February 2020

Top Javascript Interview Questions

These Javascript interview questions are based on my personal interview experience. Likelihood of question being asked in the interview is from top to bottom.

1. What is closure and how do we use it ?

2. What is promises and why do we use it ?

3. How to use async and await and what problem it solves ?

4. Difference between call, apply and bind ?

5. What is Arrow functions and how it is different from normal functions ?

6. Difference between "==" and "===" ?

7. Difference between var, let and const keywords ?

8. Difference between null and undefined ?

9. Object Oriented programming in Javascript - What is constructor and prototype? Do you know about prototypal inheritance. How do you define Class using ES6.

10. What are the methods available in Object -

create It is used to create a shallow copy of Object. Shallow copy means it copies only the properties and functions of the object but doesn't copy prototype inheritance.
assign- It is used to copy the properties and functions of one object in another object. doesn't copy prototype inheritance.
setPrototypeOf
freeze- It is used to freeze object. New properties cannot be added and existing properties cannot be modified.
seal- It is used to seal the schema of object. New properties cannot be added but existing properties can be modified.
defineProperty- It is used to define property. Can make the property readonly using this method.

11. Currying functions in javascript?

12. Lexical scoping and variable hoisting in Javascript?




No comments:

Post a Comment

Top CSS Interview Questions

These CSS interview questions are based on my personal interview experience. Likelihood of question being asked in the interview is from to...