Shubham Vora has Published 962 Articles

How to write an inline IF statement in JavaScript?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:23:39

6K+ Views

Conditional statements are the most important and basic concept of any programming language. The if-else statement allows us to execute any code block conditionally. We can define the condition for the if statement in braces, and if the condition becomes true, it executes the code of the if block; Otherwise, ... Read More

How to write a cell phone number in an international way using JavaScript?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:21:18

499 Views

When you have visitors from worldwide on your websites, it is a good idea to show things like a cell phone number according to international standards. So they can easily understand. We can use the International Public Telecommunication Numbering Format to represent the cell phone number in an international ... Read More

How to wrap setTimeout() method in a promise?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:20:12

6K+ Views

The setTimeOut() method executes some block of code or functions after a particular number of milliseconds. Sometimes, we require to resolve or reject the promise after a particular delay, and we can use the setTimeout() method with the promises. In JavaScript, a promise is an object that returns the ... Read More

How to wait resize end event and then perform an action using JavaScript?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:18:50

2K+ Views

Whenever we resize the web page window, it triggers the ‘resize’ event by default. The ‘resize’ event triggers multiple times while resizing the window. Sometimes, we require to execute some JavaScript code only once when resize event completes. In such cases, we must use the setTimeOut() method with the ... Read More

How to view array of a structure in JavaScript?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:17:38

341 Views

The easiest way to debug the JavaScript code is using the console.log(), which many developers use. Sometimes, we require to know the array's structure and stored values for the debugging purpose. In this tutorial, we will learn to view the array of structures. Various methods of JavaScript allow us ... Read More

How to create refs in ReactJS?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:14:40

344 Views

In ReactJS, refs are used to referring any node of the document. Generally, we can pass the props to children elements to interact with children from the parent’s state. Still, sometimes the child component is out of the typical dataflow of components. For example, we have four components, and dataflow ... Read More

How to create progress bar in ReactJS?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:13:27

9K+ Views

We can use the progress bar to track how many percentage of a particular task is completed. Maybe you have seen the progress bar on many websites while uploading a file, and it is one of the best use cases of the progress bar to show the uploaded percentage of ... Read More

How to Create Phone numbers and Contacts List in ReactJS?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:11:44

701 Views

We can assume that you have used mobile devices to call someone and seen the contact list. Generally, when you open the phone book on most mobile devices, it will show you three sections. The first is a keypad to dial a custom number, the second is recent calls, and ... Read More

How to create an Image Slider in ReactJS?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:10:58

17K+ Views

Image slider is crucial in any web application to show multiple images with good UX. Whenever we go on any prestigious site like amazon.com or cardekho.com, they show images in the slider, and these websites need to show multiple images for every product. Now, what if they show every single ... Read More

HTTP REST API calls in ElectronJS

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:09:03

5K+ Views

We can choose from various libraries like request, axios, or fetch to make requests to our HTTP REST API endpoint. Doing so allows us to interact with data from our API and display it in our ElectronJS application. ElectronJS is an open-source project actively maintained by the OpenJS Foundation ... Read More

Advertisements