Shubham Vora has Published 957 Articles

Regular expression to match numbers only in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 09:22:47

5K+ Views

In this tutorial, we will learn regular expressions to match numbers only in JavaScript. Data is a core element in every webpage. We have to validate it as per the requirements. We often deal with the data and require correct input from the user. For example, the user can not ... Read More

Is there a Boolean Typed Array in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 09:19:41

397 Views

In this tutorial, we will learn if there is a Boolean Typed Array in JavaScript. Typed Arrays are the objects same as arrays by using we can read or write raw binary data. It is useful to carry advanced information that contains lots of data like audio or videos fast ... Read More

How to work with document.head in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 09:14:52

2K+ Views

In this tutorial, let us discuss how to work with the document's head in JavaScript. The document head property is a dom level 3 read-only feature. The document's head property returns all the head tags in the document. HTML adds an empty head tag in case it is not present. ... Read More

How to work with document.anchors in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 09:12:14

852 Views

In this tutorial, let us discuss how to work with the document's anchor in JavaScript. Relevant web technologies no longer recommend this property. Some browsers still recommend it for compatibility reasons. The document anchor property is a read-only feature that returns all the anchor tags. The anchor tag represents the ... Read More

How to work with Structs in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 09:06:39

8K+ Views

In this tutorial, let us discuss how to work with structs in JavaScript. What is a struct? A struct is the short name of the data structure. The structure creates multiple values of different types in a single variable. We can use a struct to generate records. A struct in ... Read More

How to validate a given number in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 09:02:03

4K+ Views

In this tutorial, let us discuss how to validate a given number in JavaScript. Users can follow the syntax below each method to use it. Using regular expression The method tests or matches the regular expression with the input. Syntax /\D/.test(input); input.match(/^[0-9]*$/); If the input is a number, the ... Read More

How to set the width of the top border with JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 08:16:51

277 Views

In this tutorial, we will learn how to set the width of the top border with JavaScript. The border of an element is the outer part of the element. The border width for each side can be set with different JavaScript properties. For example, to set the width of the ... Read More

How to set the type of quotation marks for embedded quotations with JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 08:14:18

525 Views

In this tutorial, we will learn how to set the type of quotation marks for embedded quotations with JavaScript. The types of quotation marks can be changed using JavaScript. For example, if a sentence is in double quotes(“”), it can be modified to single quotes(‘’). To set the quotation, use ... Read More

For the Hosts Locale how to convert a string to uppercase letters in JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 08:08:31

301 Views

In this tutorial, we will learn how to convert a string to uppercase letters for the host's locale in JavaScript. While using a locale language to write for a website, we might have to convert the sentence from lowercase to uppercase without changing the structure of the string. Using the ... Read More

How to set the left margin of an element with JavaScript?

Shubham Vora

Shubham Vora

Updated on 15-Nov-2022 08:05:12

5K+ Views

In this tutorial, we will learn how to set the left margin of an element with JavaScript. Margin is the space around an element outside its border. The margin of an element can be on all sides, such as: left, right, top, and bottom. Use the marginLeft property in JavaScript ... Read More

Advertisements