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…
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.
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.
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!!
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!!
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.
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!!!
Let’s understand the normal meaning of each word.
Debouncing — De + bouncing
Bouncing is refer to the tendency generate…
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.
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…
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!!!
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.
When you google it you will find something like…