1| Use of Double Equal (==) vs Triple Equal (===)?
Double equal (==) is used for only comparing two different variable’s values only.
On the other hand Triple (===) is checking the variable’s Value and Type both.
2| What is Scope and Scope Variable? How does it work?
The scope is like a boundary. When you declare a function it makes a Scope.
Basically, Scope has 2 categories
Global Scope means, if you want to declare a variable live var, you can access it in the functions var is a global variable that’s why you access it anywhere in your app. And easily use it inside the functions or outside the functions.
3| What is Hoisting?
4| What is Bind, Call, Apply?
Bind is a method of binding one function to another. when you need a different function attach your main function so you its do use it with the Bind method. after binding this method, you access it from one function to another function.
Call and Apply-
when you use the bind method it does not call immediately, it takes some time. But the Apply and Call method respond immediately. The call and Apply methods are almost similar. but there was a small difference. that is you do pass many arguments in the call method, on the other hand, apply method takes 2 arguments just.
5| How Find Largest Element in Array?
Whenever you need to find the largest element of an Array, you should have 2 options to find it.
- First of all, you declare an array that has more than elements. then next steps you declare a variable and set in the variable value as ‘0’.after that you throw the For loop on the array. and write if, else condition of it.
- To do the as simple as that just declare an array. and just do the (Math. max)method on the array. like —
Var array1 = [your elements];
6| How Remove Duplicate Item from an Array?
If you remove repeating element form and you just apply a single method is-
Var number = [your elements];
Var afterRemove = […new Set(number)];
7| How Count Word Number of String?
When you need to know how many words in your string, then you just apply this method which I provide in the under-
Var paragraph = “your paragraph”;
8|What is API, Get, and POST? and How it Work?
API is a link/URL, there are many data saves in this link. when we need dynamic data to show on our app then we create an API link/URL, put the all data as JSON format in the API, and use data that is necessary for us from this link/API.
When we need data from the API link, first we call API link, load data in the application, and then we use the GET method to get data to show our UI.
It is also similar to the GET method. but they work differently. To post data on the server from UI. Basically, it posts data on the server and the server saves this data on the database.
9| What is Dom?
Dom is a Document object Model. It is compiling our HTML in the browser and showing on our document as content.
10| What is Event Bubbling?
An Event bubble is like a tree. it has a parent-child relation. when we work on a nested function its creates an effect on the main function. and it's called an Event Bubble.