Shubham Vora has Published 962 Articles

How to extract the number of minutes from current time in JavaScript?

Shubham Vora

Shubham Vora

Updated on 23-Aug-2022 09:24:30

2K+ Views

We humans can understand how the date and time are divided and printed. On theother hand, JavaScript interprets the date based on a timestamp generated from Unix time, which is a value made up of milliseconds. JavaScript Platform-independent date objects represent a single point in time. A millisecond counter has ... Read More

How to extract the hostname portion of a URL in JavaScript?

Shubham Vora

Shubham Vora

Updated on 23-Aug-2022 09:20:54

10K+ Views

In this tutorial, we will see how to extract the hostname portion of a URL in JavaScript. What is a URL? An alternative term for a web address is a URL. For example, tutorialpoints.com is a word-based URL. An IP address can also be used as a URL (ex. 192.168.2.24). ... Read More

How to execute a JavaScript function when I have its name as a string?

Shubham Vora

Shubham Vora

Updated on 23-Aug-2022 09:18:14

2K+ Views

Calling a function from a string, stored in a variable can be done in two different ways. The first approach makes use of the window object method, and the second method makes use of the eval() function. This tutorial will guide you to learn the way to execute a JavaScript ... Read More

How to execute a JavaScript function using its name in a variable?

Shubham Vora

Shubham Vora

Updated on 23-Aug-2022 09:15:40

334 Views

What is a function in JavaScript? The JavaScript equivalent of a process is a function. A process is a series of instructions for carrying out a task or calculating a value. However, a process must accept input and produce a result to be considered a function. Additionally, there should be ... Read More

How to encode a URL using JavaScript function?

Shubham Vora

Shubham Vora

Updated on 23-Aug-2022 09:12:46

2K+ Views

As we know, a URL is a web address. What is URL encodingand why do we need to encode a URL? The process of turning a string into an accurateURL format is known as URL encoding. A valid URL format only uses "alpha | digit | safe | extra | ... Read More

How to do case insensitive string comparison of strings in JavaScript

Shubham Vora

Shubham Vora

Updated on 23-Aug-2022 09:10:37

1K+ Views

In this tutorial, we will learn how to do a case-insensitive string comparison of strings in JavaScript. Case in-sensitive simply means the word or string should mean the same even if they are written in lower or upper case. In this kind of case in-sensitive comparison is observed in the ... Read More

How to do basic Maths with JavaScript Operators?

Shubham Vora

Shubham Vora

Updated on 23-Aug-2022 09:05:28

157 Views

In this guide, we will explain the different methods to do basic maths with JavaScript operators. While creating any website, application, or game, you might have to show the calculated results, whether the number shows the subscriber count or the points of the user. Hence, learning how to add, subtract, ... Read More

How to determine if JavaScript object is an event?

Shubham Vora

Shubham Vora

Updated on 23-Aug-2022 08:49:40

1K+ Views

Let us first understand what is JavaScript objects and JavaScript events. An object in JavaScript is a distinct entity having properties and a type. For an instance, contrast it with a bowl. A bowl is an object with some properties. The properties are design, color, material, weight, etc. Like this, ... Read More

How to convert a decimal number to roman using JavaScript?

Shubham Vora

Shubham Vora

Updated on 22-Aug-2022 09:25:10

619 Views

Roman numerals are a type of number system used to represent a fixed decimal number. Several letters from the Latin alphabet are used for the representation of roman numerals. In this tutorial, the user will learn how to convert a decimal number to roman using JavaScript. Seven symbols represent Roman ... Read More

How and why does 'z'['toUpperCase']() in JavaScript work?

Shubham Vora

Shubham Vora

Updated on 22-Aug-2022 09:04:13

167 Views

In this tutorial, we will learn how and why ‘z’[‘toUpperCase’]() works in JavaScript. From the given format, we can say that it calls the toUpperCase() method for the ‘z’ string. It will work the same as the toUpperCase() method, which we invoke by taking any string as a reference. Let’s ... Read More

Advertisements