Handling events is a crucial part of any modern web application. Every developer who wants to write better code should have an in-depth knowledge of how events work, what is event bubbling and how to use event delegation to optimize event handling in our application.
In order to have a button listen to an…
A basic compiler job is to compile code as fast as it can and provide the interpreter with less-optimized bytecode. …
Before we get started with this article, let just recap everything we have learned so far.
First, the memory(heap) is allotted to all the variables and is given the value of undefined.
When the memory phase is done and code execution starts, all the variable are assigned their values and whenever a function needs to execute it’s being pushed in the stack and after executing the function it’s being popped off.
Website performance plays a huge role in improving the user experience of our user. This can be done pretty easily sometimes by limiting the rate of a function call and only call it when significant changes have been made.
This brings us to the topic of Debouncing and throttling and choosing the one which suits them best is crucial, as they bear different effect.
Throttling and debouncing are two ways to limit the rate of event handling.
You might ask what an event is?
Event is an action that occurs in the system. In frontend development system will be the…
Do you know why you need to enclose your if statement and others as well in curly braces whenever you want to write multiple statements inside it?
When asked in an Interview question the question that “What is Block?”.
Most people often reply with let and const are block-scoped. While it’s true that’s not what is being asked, the question is what is a block
The block statement is often called compound statement in other languages. …
Let us just start with knowing what the polyfill is and why even bother knowing it.
Everyone is been in a situation where they expect few methods that browser to support natively but with every new browser coming in there are few shortcomings also.
What you will do if you found out that Chrome from next version onwards won’t support bind method that we use for function borrowing. (Don’t know function borrowing check out this).
A polyfill is a piece of code that implements the features that you expect the browser to support natively.
Now that you know what a…
Now the question arises why 3 methods but before that why even bother learning binding concept, what is that one thing that it provides and is an absolute necessity.
One situation you might have encountered while doing your development work is having a function that does one thing and later as per new demands you want a function that does almost a similar job but on a different object.
Now you can’t just rewrite the same function and edit few variables as per need because the one…
Full Stack Developer | Working on my Startup | Loves Building weird stuff | Trying to get better at Writing and articulating my thoughts |