What are Truthy and Falsy values?
1. What is Truthy Value?
2. What is Falsy Value?
What is the difference between Null vs Undefined?
3. What is the Null value?
4. What is an Undefined value?
What is the difference between double equal and triple equal?
5. What is Double Equal?
Actually, Double Equals (
==) checks for value equality only. It inherently does type coercion. This means that before checking the values, it converts the types of the variables to match each other.
6. What is Triple Equal?
On the other hand, Triple Equals (
===) does not perform type coercion. It will verify whether the variables being compared have both the same value AND the same type.
What are Hoisting, Scope, Global Scope, and Local Scope?
7. What is hoisting?
8. What is Scope?
The scope is the accessibility of variables, functions, and objects in some particular part of your code during runtime. In other words, scope determines the visibility of variables and other resources in areas of your code.
- Global Scope
- Local Scope
9. What is Global Scope?
Global Scope variables defined outside any function, block, or module scope it’s called the global scope. A variable is in the Global scope if it’s defined outside of a function.
10. What is Local Scope?
In which Variables are declared inside any of the functions that are called the local variables. It’s cannot be accessed outside any of the function declarations.