Prabhdeep Singh has Published 180 Articles

How to return the position of the element relative to floating objects in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 07:32:28

533 Views

This tutorial teaches us how to return the position of the element relative to floating objects in JavaScript. To set the relative position or to get or return the relative position we are going to use the ‘clear’ property of JavaScript which is defined under the style property of an ... Read More

How to return the color of the text with JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 07:20:35

5K+ Views

In this tutorial, we will learn how to return the color of the text with JavaScript. In the Style (It is a rule of HTML, used to describe how a document will be presented in the browser.) we define the color under that rule of HTML. To return the color ... Read More

How to return pixel depth of the screen in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 07:15:10

462 Views

In this tutorial, we will discuss how we can return the pixel depth of the screen in JavaScript. There is a property in JavaScript name pixel depth with the help of this property we can quickly return the pixel depth of the screen’s color. This pixel depth property returns the ... Read More

How to return a number of bits used to display one color on a window screen in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 06:57:03

278 Views

In this tutorial, we will explore how we can find out the number of bits that are used to display a single color on the screen of our device using JavaScript. JavaScript has many inbuilt functions that allow us to get information about the various properties of the display screen. ... Read More

How to replace string using JavaScript RegExp?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 06:24:32

3K+ Views

In this tutorial, we will explore how we can replace a particular sub string in a string by using regular expressions in JavaScript. Sometimes we may want to replace a recurrent sub string in a string with something else. In such cases, regular expressions can be beneficial. Before using them ... Read More

How to replace all occurrences of a string in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 06:20:23

11K+ Views

This tutorial will teach us how to replace all occurrences of a string in JavaScript which mean by the end of the tutorial we will learn to detect a given type of substring from the given string and replace it will another given string by the user. To replace all ... Read More

How to replace all dots in a string using JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 06:11:14

4K+ Views

In this tutorial, we will explore the different ways by which we can replace all dots in a string using JavaScript. It is possible to remove all occurrences of dots in a string manually by running a for loop, but JavaScript provides many functions by which we can accomplish the ... Read More

How to remove two parts of a string with JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 06:05:44

3K+ Views

This tutorial teaches us how to remove the text part between two parts of a string with JavaScript, basically, we are given two ends that can be a string or a character and we have to remove the string lying in between them. In this tutorial, we are going to ... Read More

How to remove options from a dropdown list with JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 06:01:56

14K+ Views

This tutorial teaches us how to remove the options from a dropdown list using JavaScript. Usually, this is not frequent that users get the option to remove any option from the dropdown list but this is possible if the option is provided by the programmer. If the programmer wants to ... Read More

How to remove leading zeros from a number in JavaScript?

Prabhdeep Singh

Prabhdeep Singh

Updated on 07-Nov-2022 05:56:16

21K+ Views

In this tutorial, we will explore how we can remove leading zeroes from any number in JavaScript. JavaScript removes leading zeroes from an integer variable automatically, but this is not the case when we consider strings in JavaScript. It is possible that a string in JavaScript which represents a numerical ... Read More

Advertisements