Saurabh Jaiswal has Published 45 Articles

How to add rows to a table using JavaScript DOM?

Saurabh Jaiswal

Saurabh Jaiswal

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

25K+ 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

4K+ 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

372 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

182 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

744 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

1K+ 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

3K+ 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

How to convert NaN to 0 using JavaScript?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 21-Feb-2023 17:06:20

3K+ Views

We can use the logical OR operator, double bitwise NOT operator, strict equality operator, or the inNaN() function to convert NaN to 0 using JavaScript. NaN in Javascript means Not a Number, whose type is Number but actually, it is not a number. In this article, we will learn to ... Read More

How to convert Map keys to an array in JavaScript?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 21-Feb-2023 17:04:43

10K+ Views

There are different ways to convert a map keys to an array in JavaScript. You can use the map keys() method to access the keys in a map and then apply the Array form() method to create an array of the accessed keys. You can also apply the spread operator ... Read More

How to convert JSON results into a date using JavaScript?

Saurabh Jaiswal

Saurabh Jaiswal

Updated on 21-Feb-2023 17:00:43

4K+ Views

JSON is a powerful data format to exchange data from server to client and vice versa. Many time JSON data is received in a String format and we need to convert it to a usable JSON object. In this process, it’s an important requirement to convert string data into Date ... Read More

Advertisements