Mayank Agarwal has Published 403 Answers

Creating Animated Counter using HTML, CSS, and JavaScript

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 10:26:50

In this article, we will be exploring how to create an animated counter using JavaScript and basic HTML for designing.An animated counter can be described as a display that counts an animation starting from 0 and ending at a specific number. This is generally used by popular websites for creating websites ... Read More

How to Handle JavaScript Events in HTML?

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 10:16:07

An Event is basically defined as an action or occurrence of an action that is recognized by the software. An Event can be triggered by any of the following: a user, a system, or a remote callback. Some of the popular events include pressing a button, hovering, clicking on hyperlinks, ... Read More

How to get Property Descriptors of an Object in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 10:06:02

In this article, we are going to explore property descriptors and how we can fetch these values from an object. The Object.getOwnPropertyDescriptor method returns an object that describes the specific property from the given object. A JavaScript object can be created in multiple ways that can be called by using ... Read More

JavaScript: How to Check if a String is a Literal or an Object?

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 09:59:44

In this article, we will be exploring strings and how they can be used as a literal and an object depending on the requirements.JavaScript LiteralsA JavaScript literal can be referred to as representing fixed values in source code. In most languages, values are denoted by Integers, floating-point numbers, strings, boolean, ... Read More

JavaScript: How to Find Min/Max Values Without Math Functions?

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 08:49:27

In this article, we will explore how to find the minimum and maximum values from an array without using the Math functions. Math functions including Math.min() and Math.max() returns the minimum and maximum values out of all the numbers passed in the array.ApproachWe are going to use the same functionality ... Read More

JavaScript: How to filter out Non-Unique Values from an Array?

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 08:43:43

Arrays are data structures used to store data in a structured format. We can store the data in an array and retrieve them using their indexes. These indexes serve as a key for these values.In this article, we will filter out non-unique values and return an array that only contains ... Read More

How to encode and decode a URL in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 08:32:31

Encoding and decoding the URI and the URI components is required by the URL of any website to reach or redirect the user. It is a usual task in web development, and this is generally done while making a GET request to the API with the query params. The query ... Read More

How to Disable Radio Buttons using JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 08:06:53

A radio button is an input type that takes input in form of the options. The user will select one value from multiple choices. Only one option can be selected out of many possible choices.In this article, we will explore how to disable a radio button and how to enable ... Read More

JavaScript: How to Detect if a Website is Open on a Mobile or a Desktop?

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 07:56:24

We can use the CSS media queries to check whether the website is opened inside a web browser or a mobile browser. This information can be fetched using the min-width and the max-width of the webpage.CSS media queries are only limited to styling the web pages but we can control ... Read More

How to Detect if CAPS Lock is ON using JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 26-Apr-2022 07:51:22

In this article, we are going to explore the CAPS LOCK key and how to check if they are turned on or not using JavaScript on a webpage. While working with new-age web applications, we often require certain information including user interaction and experience.The user interacts with a website to ... Read More

Advertisements