Saurabh Jaiswal has Published 43 Articles

How to convert JSON data to a html table using JavaScript/jQuery?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 31-Oct-2023 21:58:41

50K+ Views

JSON (JavaScript object notation) is a powerful data format to exchange data from server to client and vice versa. HTML tables are powerful tools to represent data in tabular format so that it becomes very easy to read, analyze and compare. It is very common in web development to convert ... Read More

How to add months to a date in JavaScript?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 22-Oct-2023 13:11:49

25K+ Views

To add months to a date in JavaScript, you can use the Date.setMonth() method. JavaScript date setMonth() method sets the month for a specified date according to local time. This method takes two parameters first is the number of months and the second parameter is the number of days. The ... Read More

How to add 2 hours to a JavaScript Date object?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 05-Oct-2023 00:58:04

23K+ Views

In this tutorial, we will learn how to add 2 Hours to a JavaScript Date object. Here we will discuss two methods which are following. Using the getTime() Method Using the setHours() Method Using the getTime( ) Method JavaScript date getTime() method returns the numeric value corresponding to ... Read More

How to add rows to a table using JavaScript DOM?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 12-Sep-2023 01:30:07

36K+ Views

We will learn how to add a row to a table using JavaScript dom. To achieve this, we have multiple methods. Some of them are the following. Using the insertRow() method By creating the new Element Using the insertRow() Method The inserRow() method is used to insert a ... Read More

How to convert date to another timezone in JavaScript?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 21-Apr-2023 17:00:51

7K+ Views

JavaScript has a new Date() constructor which is used to create a date object to get the current date and time. This date object uses the UTC timezone or the client browser's timezone, i.e. if you are in India and use the new Date() constructor to get the date and ... Read More

How to convert decimal to hex in JavaScript?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 21-Apr-2023 16:59:14

643 Views

For any computer programmer who is working with low-level language or assembly language, it is a fundamental task to convert decimal to hex or hexadecimal. In web development we use colors and to represent them it is a common practice to use hex color codes. In Javascript, it is very ... Read More

How to Convert CFAbsoluteTime to Date Object and vice-versa in JavaScript?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 21-Apr-2023 16:58:31

282 Views

CFAbsoluteTime is the elapsed time since Jan 1, 2001, 00:00:00 UTC. This is a standard time format on Apple devices. On the other hand, a date object is a built-in object in JavaScript used to represent date and time values. It has many methods for providing formatting and converting date ... Read More

How to convert hyphens to camel case in JavaScript?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 21-Apr-2023 16:57:25

2K+ Views

As a developer, we often encounter hyphenated strings. A hyphenated string makes our code more readable when the string’s length is high and the name is very complex. To solve this problem we use a camel case. Camel case is a very popular naming convention, in which we combine multiple ... Read More

How to convert Hex to RGBA value using JavaScript?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 21-Apr-2023 16:56:09

2K+ Views

While designing web pages we use colors to make web pages more appealing and engaging. We commonly use hex code to represent colors but sometimes we need to add transparency to the colors which can be achieved by RGBA values. Hex color values are represented by #RRGGBBAA and The RGBA ... Read More

How to call JavaScript function in an alert box?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 05-Apr-2023 10:59:07

4K+ Views

To call a JavaScript function in an alert box, you can use the alert() function, a built-in function in JavaScript that displays an alert dialog with a specified message. An alert box is a simple dialog box that displays a message to the user and provides an OK button. It ... Read More

Advertisements