Front End Technology Articles

Page 318 of 652

JavaScript: How to check if a number is even without using the modulo operator?

Shriansh Kumar
Shriansh Kumar
Updated on 15-Mar-2026 1K+ Views

For a given integer number, write a program in JavaScript to check whether a number is odd or even and return the same to the user. It's pretty easy to check whether a number is even by using the modulo operator. But, in this article, we will be checking whether a number is even or not without using the modulo operator. Using the For Loop In this approach, we are going to use the for loop to check whether a number is even or not. The idea is to take a Boolean flag variable as true and toggle ...

Read More

Creating Animated Counter using HTML, CSS, and JavaScript

Mayank Agarwal
Mayank Agarwal
Updated on 15-Mar-2026 19K+ Views

An animated counter is a display that smoothly transitions from one number to another, typically starting from 0 and counting up to a target value. This creates an engaging visual effect commonly used in dashboards, statistics displays, and landing pages. In this article, we'll create an animated counter using HTML for structure, CSS for styling, and JavaScript for the animation logic. Steps for Creating Animated Counter Follow these steps to build the animated counter: Create two div elements: one container for styling and one to display the counter value. ...

Read More

How to Become a JavaScript Developer?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 430 Views

A JavaScript developer is a programmer who specializes in creating interactive and dynamic web applications using JavaScript, the world's most popular programming language. JavaScript developers build everything from simple website interactions to complex single-page applications, mobile apps, and even server-side applications using Node.js. JavaScript developers work on both front-end development (user-facing interfaces) and back-end development (server-side logic). They collaborate with designers, other developers, and stakeholders to create responsive, user-friendly web experiences that run seamlessly across different browsers and devices. Essential Skills for JavaScript Developers To become a successful JavaScript developer, you'll need to master several core technologies ...

Read More

How to display value of textbox in JavaScript?

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 19K+ Views

To display value of textbox in JavaScript, you can access the user input for validation, form processing, or real-time feedback. This is essential for checking email format, password strength, and other input validation requirements. In this article, we will explore two different approaches to get and display textbox values in JavaScript using practical examples. Approaches to Display Value of Textbox Here are the main approaches to display textbox values in JavaScript that we'll cover: Using value Property Using FormData Object Using value Property The ...

Read More

How to Convert JSON String to Array of JSON Objects Using JavaScript?

Saurabh Jaiswal
Saurabh Jaiswal
Updated on 15-Mar-2026 10K+ Views

To convert JSON string to array of JSON objects using JavaScript is necessary because JSON strings cannot be directly modified or manipulated, so we need this conversion which allows us to access, modify and iterate over each item. We will be discussing three different approaches for this conversion from JSON strings to array of JSON objects. In this article we are having JSON string, our task is to convert JSON string to array of JSON objects using JavaScript. Approaches to convert JSON string to objects Here is a list of approaches to convert JSON string to array ...

Read More

ES2022 JavaScript at() Method

Saurabh Anand
Saurabh Anand
Updated on 15-Mar-2026 327 Views

JavaScript ES2022 introduced the at() method for strings, providing a more robust way to retrieve characters at specific positions. Unlike the traditional charAt() method, at() supports negative indexing and handles edge cases more gracefully. Syntax string.at(index) Where string is the target string and index is the position (zero-based). Returns the character at the specified index, or undefined if the index is out of range. Basic Usage Here's how to retrieve the first character of a string: ...

Read More

JavaScript Count the number of unique elements in an array of objects by an object property

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 2K+ Views

In JavaScript, when dealing with arrays of objects, it's common to need to extract specific values based on object properties and count how many unique occurrences exist for a particular property. Whether you're processing a list of users, products, or any other data structure, counting unique elements by a property is a useful operation. In this article, we'll discuss how to count the number of unique elements in an array of objects based on a specific property using a few different techniques. Problem Statement You have an array of objects representing users, each with properties like name, ...

Read More

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

Mayank Agarwal
Mayank Agarwal
Updated on 15-Mar-2026 3K+ Views

In this article, we will explore how JavaScript strings can exist as literals or objects, and learn methods to distinguish between them. In JavaScript, strings can exist in two forms: String Literal: Created using quotes (', ", or `) String Object: Created explicitly using the String constructor with new String("text") Understanding String Literals vs String Objects String literals are primitive values, while String objects are wrapper objects around the primitive string value. This distinction affects how they behave with certain operators and methods. Using typeof to Check String ...

Read More

Generate all combinations of supplied words in JavaScript

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 1K+ Views

In JavaScript, there are scenarios where you may need to generate every possible combination of a string's characters. This can be especially useful in areas like cryptography, analyzing subsets of data, or solving problems involving permutations. In this article, we'll learn to implement a JavaScript function to achieve this task. Generate all combinations of supplied words Following are the different approaches for generating all combinations of supplied words − Recursive Approach Iterative Approach Using Bitmasking Using Recursive Approach The recursive approach builds combinations by including ...

Read More

JavaScript - Find if string is a palindrome (Check for punctuation)

Nikitasha Shrivastava
Nikitasha Shrivastava
Updated on 15-Mar-2026 985 Views

In JavaScript, checking if a string is a palindrome while handling punctuation requires cleaning the string first. A palindrome reads the same forwards and backwards, ignoring spaces, punctuation, and case. What is a Palindrome? A palindrome is not limited to single words like "radar" or "level"; it can include phrases or sequences like "Madam, in Eden, I'm Adam." We need to ignore punctuation, spaces, and case differences to ensure accurate palindrome checks. Using String and Array Methods The first approach uses JavaScript's built-in string and array methods to normalize and reverse the string: ...

Read More
Showing 3171–3180 of 6,519 articles
« Prev 1 316 317 318 319 320 652 Next »
Advertisements