Some important interview Question in JavaScript and ES6

Short Description

1. What is a callback function?

2. Why do we need callbacks?

As observed from the output, JavaScript didn’t wait for the response of the first function and the remaining code block got executed. So callbacks are used in a way to make sure that certain code doesn’t execute until the other code finishes execution.

3. What is a callback hell?

4. What is the typeof operator?

5. What is undefined property?

Any variable can be emptied by setting the value to undefined.

6. What is null value?

7. What is the difference between null and undefined?

Null

  1. It is an assignment value which indicates that the variable points to no object.
  2. Type of null is object.
  3. The null value is a primitive value that represents the null, empty, or non-existent reference.
  4. Indicates the absence of a value for a variable
  5. Converted to zero (0) while performing primitive operations

Undefined

  1. It is not an assignment value where a variable has been declared but has not yet been assigned a value.
  2. Type of undefined is undefined
  3. The undefined value is a primitive value used when a variable has not been assigned a value
  4. Indicates absence of variable itself
  5. Converted to NaN while performing primitive operations

8. What is isNaN?

9. What are global variables?

10. What is NaN property?

11. What is event bubbling?

12. What is BOM?

Browser Object Model (BOM)

I am Aiman. I am a web developer. I can learn anything at any time. For that, I take the help of Google. My core skill is based on JavaScript .