Found 10710 Articles for Web Development

Explain RegExp in ES6?

Rushi Javiya
Updated on 29-Dec-2022 15:33:42

136 Views

The ES6 is the latest JavaScript version which was introduced in 2015. We will learn about all the features of RegExp means regular expression, which Es6 contains. What is the Regular Expression and Usage of it The regular expression is a string representing the particular search pattern containing the different characters, such as numeric, alphabetic, and special characters. Let’s understand the real−time usage of regular expression. We hope you all have filled out any form in the past and seen particular form field validation errors. For example, if you don’t enter the email with the ‘@’ character or enter a ... Read More

Explain Promise.allSettled() with async-await in JavaScript?

Rushi Javiya
Updated on 29-Dec-2022 15:24:03

6K+ Views

Promise.allSettled() is a method that takes an iterable of promises as an argument and returns a promise that is fulfilled when all of the promises in the iterable have been settled, meaning that they have either been fulfilled or rejected. When the returned promise is fulfilled, it is resolved with an array of objects containing information about the fulfilled or rejected promises. Each object has a status property, either fulfilled or rejected, and a value or reason property, respectively. For example, if you have an array of promises that represent network requests and want to know each request's status (whether ... Read More

Explain Promise.all with async-await in JavaScript?

Rushi Javiya
Updated on 29-Dec-2022 15:22:01

5K+ Views

Simple operations like adding two numbers or string manipulation codes execute sequentially in JavaScript and return the results instantly. But while coding for real−world applications, we frequently make time−taking calls to databases, APIs, and other applications. These longer calls don’t return the results instantly; they will rather return a promise. A promise is an object to represent the future results of an asynchronous operation. It is used to handle asynchronous processes' eventual success or failure. For instance, if you request some object from an API in JavaScript, you will be given a promise that the task will eventually be complete ... Read More

Explain Promise.race() with async-await in JavaScript?

Rushi Javiya
Updated on 29-Dec-2022 15:19:30

1K+ Views

We will learn about the Promise.race() method in this tutorial. As the name of the race() method suggests, promises passed as a parameter of the race() method do the race to execute. So, Whichever promise will be resolved first, will be executed only by the race() method, and other promises will never be executed. Promise.race() The Promise.race method in JavaScript allows you to wait for the first of a set of promises to be fulfilled or rejected, and to handle the result or error that occurs. It returns a promise that is fulfilled or rejected as soon as one of ... Read More

Explain Promise.any() with async-await in JavaScript?

Rushi Javiya
Updated on 29-Dec-2022 15:17:09

684 Views

We will learn about any() method of the promise in this tutorial. In JavaScript, we can use the promises to handle the asynchronous request. Writing the asynchronous code in our application to fetch the data makes it faster as it executes the other code without waiting for the data. Promise.any() Method As the name of any() method suggests, it will execute any promise fulfilled. So, whichever promise will resolve first, will be executed by the promise.any() method and others may or may not be executed. Also, all rejected promises were never executed by the promise.any() method. SyntaxUsers can follow the ... Read More

Explain Popup Message using Event?

Rushi Javiya
Updated on 29-Dec-2022 15:14:48

686 Views

We can show the popup message to the app users using the popup box. We will learn about the different types of JavaScript popup boxes in this tutorial. There are three different types of popup boxes available in JavaScript below. Alert box Confirm box Prompt box We will learn about all popup boxes one by one below. Alert Box We can show the alert box using the window.alert() method. It simply shows the message in the popup box. We can use the alert box when we need to give some message to the users. For example, when the ... Read More

Explain Passport in Node.js?

Rushi Javiya
Updated on 29-Dec-2022 15:11:01

2K+ Views

The Passport is a node package, or library which we can install in any nodeJs project. The Passport provides the functionality for authentication in the app. Also, it provides different encryption strategies to encrypt user information, such as a password. For example, what if Facebook or Google employees could see the password of their users? It is against user privacy. So, in such cases, we can use the Passport, which encrypts the password and stores it in the database. We should know the decryption algorithm and secret key to decrypt the password. Also, the Passport allows us to establish the ... Read More

Explain page redirection in ES6?

Rushi Javiya
Updated on 29-Dec-2022 15:02:25

161 Views

This tutorial will cover page redirection, introduced in the ES6 version of JavaScript. Page redirection is a way to send web page visitors to another URL from the current URL. We can redirect users to either the different web pages of the same website or another website or server. In JavaScript, a window is a global object which contains the location object. We can use the different methods of the location objects for the page redirection in ES6, which is all we learn below. Using the window.location Object’s href Attribute Value The location object of the window global object contains ... Read More

Explain non-boolean value coercion to a boolean one in JavaScript?

Rushi Javiya
Updated on 29-Dec-2022 15:00:37

386 Views

We will learn non−boolean value coercion to a Boolean one in JavaScript. For beginners, coercion word is new in JavaScript. So, let’s clarify what coercion. Coercion is converting the variable of one data type to another data type. As we all know, JavaScript is not a type−strict language. So, we don’t need to define the types of the variable. Sometimes, JavaScript automatically coerces the variables and gives unpredictable results in the output. There are two types of coercion in JavaScript. One is implicit coercion, and another is explicit coercion. We will learn both coercion one by one in this tutorial. ... Read More

Top Practical Applications of JavaScript

Rushi Javiya
Updated on 28-Dec-2022 15:39:32

333 Views

In this article, we will learn the best things done using JavaScript. A global programming language is JavaScript. Although it is present everywhere, it is also far more potent. JavaScript is significantly more versatile than only web-related tasks. This language brings up a lot of additional exciting options. JavaScript is a computer language used to add interactive scripts to web pages. It is now a potent language utilized by web servers and browsers (Node.js). Practical Applications of JavaScript JavaScript is a simple programming language for dynamic content formatting in web development. Additional uses for it include the creation of desktop, ... Read More

Advertisements