Rushi Javiya has Published 128 Articles

Components of IoT and Relation with Cloud Computing

Rushi Javiya

Rushi Javiya

Updated on 15-Mar-2023 09:43:21

Cloud computing is an important part of making the Internet of Things a success. Using cloud computing, customers are able to complete their computing activities by utilizing online service providers. Incorporating IoT devices and services into cloud infrastructure has acted as a catalyst, creating a new relationship between IoT and ... Read More

Get the relative timestamp difference between dates in JavaScript

Rushi Javiya

Rushi Javiya

Updated on 10-Mar-2023 16:53:36

Have you ever seen notifications on any website showing the time stamp? It shows something like “12 minutes ago”, “2 days ago”, “10 hours ago”, etc. It is related to the timestamp difference between two dates or times. Also, some apps show that this device's last login was 22 ... Read More

How to check input file is empty or not using JavaScript/jQuery?

Rushi Javiya

Rushi Javiya

Updated on 10-Mar-2023 16:52:40

In JavaScript, while working with the form elements, we need to validate the input fields and form elements when a user enters the value. In this tutorial, we will work with the file input. We will also learn to validate the file input. Sometimes, we may be required to ... Read More

How to check if the clicked element is a div or not in JavaScript?

Rushi Javiya

Rushi Javiya

Updated on 10-Mar-2023 16:51:11

Have you ever worked with the modal or seen it on any website? When you click outside the modal, it closes the modal. We must detect whether users have clicked on or outside the modal element in such cases. If users click outside the modal element, we need to close ... Read More

How to check if the string contains only digits in JavaScript?

Rushi Javiya

Rushi Javiya

Updated on 10-Mar-2023 16:48:05

We may require to find the string, which contains only digits but not any other characters while developing. The easiest way to check can parse the numbers from the string and compare its length with the original string’s length. If both are the same, that means the string contains only ... Read More

How to check if one date is between two dates in JavaScript?

Rushi Javiya

Rushi Javiya

Updated on 10-Mar-2023 16:44:52

In JavaScript, we can use the Date() object to create different timestamps. Also, we may be required to check if one date is between two using JavaScript. For example, we want to create a filter for orders in the eCommerce application based on the dates. So, we should be ... Read More

How to check if the date is less than 1 hour ago using JavaScript?

Rushi Javiya

Rushi Javiya

Updated on 10-Mar-2023 16:42:07

In this tutorial, we will learn to find the difference between two dates and check if the difference is less than one hour. Sometimes, developers must play with the Date object and perform some operation every hour. So, this can be one approach that checks if a particular operation is ... Read More

How to check if CSS property is supported in the browser using JavaScript?

Rushi Javiya

Rushi Javiya

Updated on 10-Mar-2023 16:40:52

Nowadays, some CSS properties are deprecated, and some browsers do not support them. So, sometimes we require to check if CSS property is supported by the browser or not and need to use it accordingly to style the elements. However, we can do that using the ‘supports’ rule of ... Read More

How to check if a string is html or not using JavaScript?

Rushi Javiya

Rushi Javiya

Updated on 10-Mar-2023 16:38:57

Sometimes, developers require to manage the HTML from JavaScript. For example, developers need to append some HTML nodes to a particular HTML element by accessing them in JavaScript. So, before we append an HTML string to any HTML element using JavaScript, we need to evaluate the string we are ... Read More

How to check if a number evaluates to Infinity using JavaScript?

Rushi Javiya

Rushi Javiya

Updated on 10-Mar-2023 16:36:52

In JavaScript, when we divide any number by zero, we can get the infinity value. Also, developers can make a mistake in writing the mathematical expression which evaluates to Infinity. So, before we perform any operation with the returned value from the mathematical expression, we need to check if the ... Read More

Advertisements