Top Advanced Topics In Javascript

Monib Bormon
3 min readDec 22, 2021

--

Here in this article, I will discuss the top advanced topic in my way to know. I think it will be helpful for beginners to learn the advanced things in Js.

  1. Truthy or Falsy Values: truthy and falsy values in javascript are used to check is the value is true or false. Truthy value means that the value is true. It is usually checked in if-else condition. Truthy values are true, number,string etc. Falsy values are like null, undefined, false, -0, NaN etc.
  2. == and === : this double and triple equal is very important to compare the values and it’s type. It is usually used to compare something. The == equal means it will checks the value is equal or not. If the value is equal then it will return true neither it will return false. The === means it will checks value but the thing is it will also checks the both types also. That means if value is equal but type is not equal then it will return false.
  3. Null vs undefined: here the null means there is no values. But null returns an object. Null means zero value. Whereas undefined means the value is not set yet. When we want to get a value before it is initialize on that time it returns undefined. That means the value is not declared yet. The data type of null is Object. Whereas the data type of undefined is undefined.
  4. Scopes: there are some scopes in javascript like block scope, local scope, global scope.
  • Block scope: when a variable or function is under a block of a {} bracket and we only can access them from that block only that is block scope. If we declare a variable in a block scope. It will only be accessible from that block. When we will try to access that variable it will throw an error to us.
  • Local scope: local scope is also like the block scope. But is it happen when we create a function. Local scope works in a function. That means the access and visibility of a variable is only on that function.
  • Global scope: this is a global area. When we declare a variable or something like that in a global scope that means it can be accessible from anywhere. We can also access this variable from a block scope or local scope. That’s why it is called global scope.

But one thing is to be noted that all the scopes are very important from their position.

5) This keyword: this keyword is also a very important topic in javascript. This is a very hard-to-understand topic in javascript. This keyword refer the object that it belongs to. It may vary in a different perspective of the behavior of this.

6) DOM: dom stands for Document object model. All of our html elements are structured like a tree. With the help of dom we can change our websites interactivity by accessing the html element through dom. Dom is mainly used to track the changes of our website behavior. All the events are handled by dom. Dom in very important to a website.

7) API: API stands for Application Programming Interface. There are some methods of API to handle the request and response from client to server. Some of them are get, post, put.

  • When we want to get something or send a request to get something from the server get method helps us to handle this operation.
  • When we want to post something or to add something to our database on that time we will use the post method
  • Put: if we need to update some data in our database then we will use the put method to updata the data.

--

--

Monib Bormon
Monib Bormon

No responses yet