Currying is a way of transforming a function callable as f(a, b, c) to a function which is callable as f(a)(b)(c).

Below is a syntax of a curried function.


The way of extending the common properties from one object to another though their prototype property is called prototypal inheritance.

The inheritance in JavaScript is a bit different from other languages. It’s more of a delegation rather than inheriting the properties. Everything in JavaScript is an Object in essence. Each…


Immediately Invoked Function Expression (IIFE) is a function expression that runs as soon as it’s defined.

An IIFE has the below syntax,


Event delegation is a technique of adding a single event listener on a parent element instead of adding a separate one on each of the child elements.

Event delegation comes in handy when we want a similar behaviour on all the descendants of an element without adding an event listener…


The call and apply are both used to call a function using a desired this value and a set of parameters.

Both these functions accept the first argument as the value of this. The only difference between the two is that .call accepts the list of parameters as a comma…


|warning: this shorts might not be that short :D

this is one of the most confusing concepts of javascript, it behaves a little differently when compared to other languages. The value of this keyword depends on what context (global or object) the function is called.

There are a few rules…


The bind() method creates a new function that, when called, has its this keyword set to the provided value followed by the arguments of the function.

In simple words, if we want to provide a value for this keyword to any function tied to an object or a class, we…


Any function which uses a variable outside of it’s functional block within its lexical scope is an example of a Closure.

In theory, any inner function in JavaScript can access the variables defined in the outer function with the help of Closures. …


Hoisting, in layman terms is a way of moving the variable (declared using var keyword) and function declarations to the top of the code block.

What actually happens is, during the compile phase of the code these variable and function declarations are put in memory. One important thing to note…

Prakhar Jaiswal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store