Blogs
Discuss the scope of var, let, and const
- Var : Var declared in the Global scope and can be from access anywhere from the app. Also value can be changed.
- Let : Let is blocked scope that means it can't be access from outer scope but you can still re-assign the value.
- Const : This is the most used variable. Because it solves the both global scope problem and re-assign issue.
Tell us the use cases of null and undefined
- Null : Null represents the intentional absence of a value and Null is used as a placeholder value for missing data. Also Null is often used in database queries to represent NULL values.
- Undefined : Undefined is the default value for uninitialized variables and Undefined is returned when trying to access a non-existent property of an object. Also Undefined indicates that a value is not yet known or available.
What do you mean by REST API?
- REST API stands for Representational State Transfer API. It is a software architectural style for designing web services. REST APIs are stateless,
- This means that clients use HTTP methods, such as GET, POST, PUT, and DELETE, to interact with resources.
- Stateless: This makes them easy to scale and efficient.
- Cacheable: This means that responses can be cached, which can improve performance.