A Beginner’s Guide to understand the promise concepts

In this article, we will discuss about the fundamentals concepts of Javascript Promise and how we can handle the asynchronous operation with a JS promise which is quite complex to understand for many learners. So I will try to explain each concept with proper detailing and real-world example that will give you a better idea about Promise in a much easier way.

What is Promise in JS?

In simple words, a promise is a commitment by someone to do or not do something.

Exactly the same kind of thing Promise does in JS.

Let’s take a simple example scenario first.

Imagine you are a famous…

In this article we will discuss about the concept f and usage of Callback functions in the JavaScript Programming language.Callback functions are an important part of JavaScript and once you understand how callbacks work, you’ll become much better in JavaScript.

What is Callback functions in JS?

Suppose you are calling your friend XYZ to discuss something ,but someone else pick up the call and told you that XYZ is not available right now.And you ask him to inform XYZ to call back you return when he/she is available and when XYZ available he/she called you back.

This same concept apply with Callback in JS.

A callback…

We will discuss about the topic that is asked in almost every JS interview i.e Closure. Although it’s quiet easy to understand but we make it complicated by not giving proper attention and lack of knowledge. Having a proper understanding of these concepts will help you to write better, more efficient and clean code.

What is Closure in JS?

In simple words, JS closure — refers to an inner function that has access to the current scope and outer scope (enclosing) function’s variables( i.e scope chaining).

To learn more about scope and chaining you can refer this article.

Before start discuss about the closure ,let’s…

In this article ,we will discuss about what is JS scope,it’s different types and how Js differentiate different type of scoping to process the variable and which environment helps it to understand the scoping in much easiest way!! Every beginner should have clear understanding about these things.

So let’s begin our discussion with scoping in JS!!

What is scope in JS?

In JS scope refers to — the accessibility (visibility) of the variables.

So basically it’s define where you can use/access a variable or not.

Importance of Scope!!

  • The most important benefit of scope is security. That means you can’t access variable that is not…

In This article we will discuss about the strict mode and new js features Nullish coalescing operator and optional chaining.Using of these features we can write our code more clean and precise way .

Let’s start with Strict mode . Many of you have seen written code like below in many files at the top.

'use strict'

What’s it ? Why we use it ? It’s mandatory to use? 🤔 Hold on!!!

I’ll briefly clear your each doubts !!! And then it’ll be easy-peasy for all of you!!

If you follow JS from starting or you have read somewhere that…

In this article,we will discuss about that how we can enhance the performance of website using Denounce and throttle.We will learn these things with proper example that will help to understand the topic in much depth and then you can able to implement these by yourself.

We will see that what is debouncing and throttling? Why we need these? What are the problem we will face without these? How these helpful in those case? How to implement and many more!!!

What is Debouncing and Throttling?

Let’s understand the normal meaning of each word.

Debouncing — De + bouncing

Bouncing is refer to the tendency generate…

We will explore one of the powerful features of the ES6 specification of JavaScript — the Spread Operator.Also will see REST parameter which have similar syntax with different use case.Although the both syntax is simple and similar, but sometimes the implementation is confusing if you do not understand it properly.

So let’s start with first REST Parameter which will be easy to understand and will be more clear with going forward in the article.

What is REST Parameter?

Let’s understand the meaning first.

As name suggest Rest which indicates the — “unused” / “more than expect”and Parameter which indicates the — “input props name…

This is a new ES6 feature added in the JavaScript.The first simple use of template literal is to enable you to solve the complex string problem in safer and clean way.

So right now most of you are thinking about many things like what does template literals means?What exactly it does?Does it only use to ease the string task ?But How? and many more…. So hold on we will went through each concept step by step and at the end of this all of you have clear understanding about Template Literals.Let’s Begin!!!

What does Template Literals means?

Template literals (formerly known as template strings) are…

Most of the time learners don’t focus on the basic concept theory and requirements and use of any library,programming language and new techs etc. and directly dive into the coding part which lands them in a difficult position most of the time ,when they start solving the real world problem. “If you don’t know the exact use of anything then you will not use it properly”

So we’ll start with main basic concept behind the react-js that will help you to build a strong basic understanding of react and its uses.

What is React-Js?

When you google it you will find something like…

Rajesh Kumar

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