1. What is the difference between var, let & const variables?

  • var — variables declared using var allow you to change the value of variables. Example: var a =13. Scope of variables declared using var is its current execution context and closures thereof, which is either the enclosing function and functions declared within it or, for variables declared outside any function, global.
  • **const — **variables declared using const do not allow you to change the value once it is defined.
  • let — variable may be reassigned value once it’s declared, such as a counter in a loop. It also specifies that the variable will be used only in the block it’s declared in.

2. What is the difference between == & === ?

3. What is the difference between Null & Undefined?

4. What will be the output when print null == undefined?

5. What is the difference between put & patch?

6. What is the Strict mode in JavaScript and how can it be enabled?

7. What does the “this” keyword represent?

8. What is object destructing?

9. What is CORS policy?

10. What are promises?

11. What is async await?

12. What is the event loop?

13. What is the difference between forEach & the map function?

#coding #careers #javascript #programming #interview

13 Basic But Important JavaScript Interview Questions
1.25 GEEK