>> Discuss the scope of var, let, and const

var:

> 'var' has a function-level scope. It means it's accessible within the function where it's declared.

> If declared within a function, it's not accessible outside of that function.

> If declared outside of any function, it becomes a global variable and is accessible throughout the code.


let:

> 'let' has a block-level scope, which means it's confined to the block (within curly braces) where it's declared.

> It's not accessible outside of the block where it's defined.


const:

> 'const' also has a block-level scope like let.

> It is used for declaring variables whose values should not be reassigned once set.

>> Tell us the use cases of 'null' and 'undefined'

null:

> Think of 'null' as a deliberate empty value.

> You can use 'null' when you want to indicate that a variable or object intentionally has no value, and you assign null to represent this absence of value.

> It's often used when you want to reset or clear a variable or object, showing that it's intentionally empty.


undefined:

> 'undefined' typically means that a variable or object has been declared but hasn't been assigned a value.

> It's automatically assigned to a variable that is declared but not initialized.

> 'undefined' can also occur when trying to access a property of an object that doesn't exist.

>> What do you mean by REST API?

> a REST API (Representational State Transfer Application Programming Interface) is a way for different software applications to communicate with each other over the internet. It's like a menu in a restaurant , you can see a list of dishes, along with descriptions of each dish. When you specify what you'd like, the kitchen (i.e., the system) prepares the dish and serves it to you.