Q: What is the difference between “Null” and “Undefined”?
Answer: Null is an object and Undefined is a type. “Undefined “ means .. a variable declare but no value has been assigned. And “Null” is an assignment value you can assign in a variable.
Q: What is the difference between “==” and “===”?
Answer: “==” Double equal is abstract equality compares operator. Which is compare in value just. And “===” triple equal are strict equality, comparison operator. Which is compare in value with type
Q: What is hoisting in a variable?
Q: What is the difference in hoisting between var and let?
Q: What is the difference between let and const?
Answer: If the variable is changeble then use let otherwise use const.
Q: What is the “NaN ” ?
Answer: If the value is not a number then return “Nan”.
Answer: ‘This’ keyword refers to the object from where it was called. And it represent whose context is in.
Answer: Undefined value means the
- Variable used in the code but doesn’t exist.
- Variable is not assigned to any value.
- Property does not exist.
Answer: Load time errors, Runtime errors,Logical errors.