Closures in JavaScript.

What is a Closure?

A Closure is bundle of a function along with its lexical environment.

A continuous scope which holds the variables even after it has exited a block after execution so that they can referenced in future is a CLOSURE.

Here, function holds on to the reference to that variable and not the actual value itself and includes the parent scopes as well.

To understand more about closures in depth click on the below button.

Read More

Add Dark Mode toggle to a website.

Every website should have a DARK MODE toggle.

As most of the time we as developers, spend hours and hours working in front of our screens, having a dark theme option to a website will reduce the amount of eye strain during long sessions especially during the night.

So, lets take a look at how to add dark-theme toggle.

Read More

Hoisting in JavaScript

Hoisting is a phenomenon in which JavaScript magically🤺 moves the code to the top.

Well, not really.

But programming is not magic. There lies a logic. So, lets actually see how actually HOISTING works.

Check out the below written acticle where I explain Hoisting in-depth.

Read More