Table of content:
3. difference between
4. call(), apply() and, bind() methods;
6. rest and spread operator
But now let’s assume that we have a function that is taking some time to execute, for example in the below function which is having a loop over 10k times, the
console.log() would be executed once the loop is over and in the meantime, our UI interaction with the browser would be interrupted.
Since we know that Web APIs delegate some of the tasks to different threads, on completion of these tasks, how the main or desired functions are sent to the call stack.
Event Queue is a special queue, which keeps track of all the functions queues, which are needed to be pushed into the call stack. The event queue is responsible for sending new functions to the track for processing. The queue data structure is required to maintain the correct sequence in which all operations should be sent for execution.
The prototype object is a special type of enumerable object to which additional properties can be attached to it which will be shared across all the instances of its the constructor function.
For example, think of Apple — before Apple Computers became popular, you would probably think of an Apple as a piece of fruit that grows on trees. “Apple” in Apple Computers doesn’t have a meaning initially — but it does now.
do you want to know more about the prototype: simply follow the bellow link plz
A very tricky interview question is the difference between
As you are thinking simply == “Doble equal” is using for checking is value match also “===” ar checking for is value isMatch. but