Mayank Agarwal has Published 373 Articles

How to search a string for a pattern in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 07-Mar-2025 12:52:48

541 Views

Searching strings for specific patterns is a common task in JavaScript. Strings are data types and are represented as a sequence of characters. Searching patterns means verifying the presence of a specific pattern in a given string. A pattern would be a specific word, specific characters, and so on. ... Read More

JavaScript: Converting a CSV string file to a 2D array of objects

Mayank Agarwal

Mayank Agarwal

Updated on 26-Dec-2024 20:46:20

717 Views

A CSV is a comma-separated value that is stored in a file with the .csv extension. This allows the user to store data in a tabular or spreadsheet format. In this article, we will learn to convert the data of a CSV string to 2D array objects in JavaScript, where ... Read More

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

Mayank Agarwal

Mayank Agarwal

Updated on 09-Dec-2024 21:56:22

2K+ Views

In this article, we will be exploring strings and how they can be used as a literal and an object depending on the requirements. In JavaScript, strings can exist in two forms: String Literal: Created using quotes (', ", or `).String Object: Created explicitly using the String constructor, e.g., new String("text"). ... Read More

How to Remove Duplicate Elements from an Array in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 18-Nov-2024 16:29:05

2K+ Views

To remove duplicate elements from an array in Javascript can be achieved using various approaches. We will be understanding six different approaches in this article, which can be used according to our requirement in various cases. In this article we are having a Javascript array and our task is to ... Read More

Creating Animated Counter using HTML, CSS, and JavaScript

Mayank Agarwal

Mayank Agarwal

Updated on 01-Oct-2024 10:39:15

19K+ Views

To create animated counter, we will be using HTML, CSS and Javascript. An animated counter can be described as a display that counts an animation starting from 0 and ending at a specific number. In this article, the initial value of counter is set to 0, our task is to ... Read More

How to Create a Color Picker using HTML, CSS, and JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 29-Feb-2024 15:07:48

2K+ Views

We can easily create a simple color picker on a palette in Javascript. The primary colors on a color picker are RGB i.e. Red, Green, and Blue. With the help of mixing these colors, we can form any color we want.In this article, we will be learning about how to ... Read More

Encrypt and Decrypt Data in NodeJS

Mayank Agarwal

Mayank Agarwal

Updated on 12-Sep-2023 03:06:57

48K+ Views

NodeJS provides inbuilt library crypto to encrypt and decrypt data in NodeJS. We can use this library to encrypt data of any type. You can do the cryptographic operations on a string, buffer, and even a stream of data. The crypto also holds multiple crypto algorithms for encryption. Please check ... Read More

How to conditionally disable the input taking in VueJS?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:42:54

4K+ Views

For removing the disabled property, we can use the disabled tag available in VueJS. The disabled tag basically checks for the boolean value and decides if the input tag needs to be displayed or not. We set the value in app.js and dynamically change its value based on the toggle ... Read More

How to check if a string is palindrome or not without filters in VueJs?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:42:02

155 Views

Filters basically provides the functionality to check inputs and then apply different type of formatting or transformations to the same. The filter property of a component is an object that accepts a value and return some other confirgured value as a response. In this article, we will not use filters ... Read More

How to categorize a year as a Leap or Non-Leap using Vue?

Mayank Agarwal

Mayank Agarwal

Updated on 13-Apr-2023 16:40:34

150 Views

Vue can be defined as a progressive framework for building the user interfaces. It has multiple directives that can be used as per the user needs. The basic core library is mainly focused on building the view layer only and is also easy to pick up other libraries or integrate ... Read More

1 2 3 4 5 ... 38 Next
Advertisements