As a developer once in a while in your javascript journey
you may have got confused between the promise methods. Today
in this article, I am going to walk you through promise.all()
and promise.allSettled() methods of promises.
Familiarity with promises and it's resolve, reject methods and async js
If you are not familiar with the promise constructor please read it on MDN
Let's get started with the two promises methods and explore their differences.
1. Promise.all()
It takes an iterable(array) of promises and returns a single promise.
The returned promise will resolve when all of the input's promises get
resolved.
In this article, you will learn how simple it is to setup your
application with Vite. You will also learn how fast Vite is, how
to use it with react, and how much it gets out of your way when you
are using it.
What is Vite or Vitejs?
Vite is a lightning-fast, frontend build tool that aims to improve development experience for modern web projects.
Vite includes two major parts -
1. A Dev Server that provides rich feature strengthening over ES native support
2. A build command based on rollup.js that bundles your code and offers highly
In this article I am going to walk you through Closures one of the important concept in
JavaScript. By the end of this article you will get an idea about closures.
What is closure?
A function along with its lexical scope bundled together forms a closure.
In simple words a closure gives you access to an outer function's scope from an inner function.
Let's understand this with an example. Let's understand the above code snippet
We have an outer function x() which creates a global scope for everything which resides inside it.
Function x() contains an inner function y() which creates its local scope