Sign in

Writer, Learner, JavaScript Developer, working on

In this tutorial, we will build an E-commerce App with React using ButterCMS and Snipcart. We will use Chakra UI, a modular and accessible component library, to style the app.
Finally, we will deploy our ecommerce app with Stormkit, a serverless deployment service for JavaScript apps similar to Vercel or Netlify.

If you want to jump right into the code, check out the GitHub Repo here.

And here’s a link to the deployed version:


  • Knowledge of HTML, CSS & JavaScript
  • Basic knowledge of React
  • Node & NPM installed on the local development machine.
  • Any code editor of your choice.

Photo by Christopher Gower on Unsplash

In the previous post, Synchronous vs Asynchronous Programming, we discussed the difference between Synchronous and Asynchronous programming in JavaScript. In this article, we will discuss what are Callbacks in JavaScript.


Callback is a function that is passed as an argument to another function and its execution is delayed until that function in which it is passed is executed.

Meaning, if I pass a function, let’s say function1 to another function, i.e., function2,then function1 will not be executed until function2 is executed.

Callbacks are a fundamental part of Functional Programming, and you may be already using them without knowing; methods like…

Photo by MORAN on Unsplash


In this article, we will discuss What Synchronous Programming is? What Asynchronous Programming is? And whether JavaScript is Synchronous or Asynchronous?

Many developers struggle to understand topics like Callbacks, Promises, and Async/Await, one of the reasons may be not understanding the actual need and core logic behind them.

Having a good grasp of this topic can help you understand them more easily.


This can be better explained with the help of an example.
Imagine you gave your friend a set of tasks:

  • Get Video Games from adjacent towns (somewhere far).
  • Get Chocolate from a nearby store.

What your friend now…

And is it really so dangerous?

Photo by WOCinTech Chat on Flickr

In this article, we will be discussing what dangerouslySetInnerHTML is, how it is used, what the differences are between dangerouslySetInnerHTML and innerHTML, and a real project where it proves to be useful.


dangerouslySetInnerHTML is an attribute under DOM elements in React.

According to the official documentation, dangerouslySetInnerHTML is React’s replacement for using innerHTML in the browser DOM.

This means that if in React if you have to set HTML programmatically or from an external source, you would have to use dangerouslySetInnerHTML instead of traditional innerHTML in Javascript.

In simple words, using dangerouslySetInnerHTML, you can set HTML directly from React.



Photo by Fernando Hernandez on Unsplash

In this post, we are going to build a pokemon index using Pokemon API in plain Javascript. First, let’s discuss what this project is about, there will be a search bar where users can come and search for a pokemon and after the search, pokemon with its image and stats, as a result, will be shown. So, the functionality is pretty basic but you using this project as a base can tweak and make your own version of this project and add it to your portfolio.

The full version is deployed at

This project is inspired by Chris on…

Object literals are only the beginning

Photo by Markus Spiske on Unsplash

Almost everything in Javascript is an object, whether it’s an array or a function. In this post, we’ll learn three different ways to create objects in JavaScript:

  1. Object Literals
  2. New Keyword
  3. Class

Object Literals

A JavaScript object literal is a comma-separated list of name-value pairs wrapped in curly braces. Object literals encapsulate data, enclosing it in a tidy package.

Object literal property values can be of any data type, including array literals, function literals, and nested object literals.

Shorthand property names

Consider a scenario in which you have to put different variables inside an object. One way of doing it is:


Photo by Alejandro Barba on Unsplash

In this post, we are going to discuss hoisting. We’ll be discussing what it is and why it’s important for you to know as a Javascript developer or programmer.

This article is the first of many small articles discussing key areas and terms in Javascript, such as call stack, callback, promise, async, etc.


Before we start discussing what hoisting is, let us first look at a simple example:

Pretty straightforward: I declared a variable, initialized some value to it, and then logged it in the console.

Now let's look at the definition of hoisting:

Simply put, it means no…

Using sets to deal with unique elements in a dataset

Photo by JOSHUA COLEMAN on Unsplash

Sets are a new object type included in ES6 that allow the creation of collections of unique values. The values in a set can be either simple primitives like strings and integers or more complex object types like object literals or arrays. Think of sets as an array with no repeated elements.

There are many instances where we have an array containing many elements that we want to convert to a unique array. While it can be done by brute force on the array, checking elements, using loops, distinct callback method, etc., the best method is using set().



“Writing in ECMAScript language without understanding closure is like writing Java without understanding classes” — Douglas Crockford, father of JSON

Photo by Caspar Camille Rubin on Unsplash

In this piece, we are going to discuss closures and lexical scoping in JavaScript. Understanding closures leads to a better understanding of programming itself. If you are planning on becoming a professional programmer, questions regarding closures and their applications are widely asked during technical interviews and can be really helpful to you.

If you are a JavaScript Developer, chances are you already using closures and just don't know it. There are so many complex examples out there that just confuse you when you try to learn closures, so I’ll be using the simplest examples I could find and by the…

Defining one of the key components in programming

Photo by Luca Bravo on Unsplash

Functions are one of the key components in programming. They are defined to perform a specific task and can be called again and again to execute. The main difference between functions in Javascript and other programming languages is that in javascript functions are of first-class objects, which means that they behave like objects and can be assigned to variables, array, and other objects.

This post discusses three different ways to define functions:

  1. Function Declaration
  2. Function Expression
  3. Generator Function

1. Function Declaration

Probably the most common way to declare a function. Let’s look at its syntax:

Syntax for Function Declarations

Function Declaration comprises of…

Ashutosh K Singh

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