Web Development Articles

Page 328 of 801

How to find duplicate values in a JavaScript array?

Abhishek
Abhishek
Updated on 15-Mar-2026 73K+ Views

In this tutorial, we will discuss how we can find duplicate or repeating values in a JavaScript array using different methods or approaches to reach the solution to this problem. Below is the list of the approaches or methods we can use to solve the problem of finding duplicates − By simply Traversing the Array Using the filter() and indexOf() Methods Using the Set object and has() Method Let us discuss all of the above approaches to find duplicates in the JavaScript array − By Simply Traversing the Array Traversing the array using ...

Read More

How can I remove the decimal part of JavaScript number?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 47K+ Views

In this tutorial, we will learn to remove the decimal part of the number in JavaScript. While working with JavaScript, many times, developers need to play with the numbers stored in the database and needs to convert float and double numbers into the pure decimal or integer number. In this situation, developers can have multiple methods to truncate the decimal part of the number. We will see different approaches to overcome the above problem. Using the Math.trunc() method Using the Bitwise operators Using the Math.ceil() ...

Read More

How to sort an HTML table using JavaScript?

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

Sorting HTML tables using JavaScript allows for dynamic data organization without server requests. This technique uses DOM manipulation to reorder table rows based on cell content. How Table Sorting Works The sorting algorithm compares adjacent rows and swaps them if they're in the wrong order. This bubble sort approach continues until all rows are properly sorted alphabetically. Ron Shawn Caleb Compare After ...

Read More

How to hide a navigation menu on scroll down with CSS and JavaScript?

Aman Kumar
Aman Kumar
Updated on 15-Mar-2026 6K+ Views

To hide a navigation menu on scroll down with CSS and JavaScript, you should have basic knowledge of JavaScript conditional statements and CSS. We will create the navigation menu using HTML, style it with CSS, and use JavaScript to hide the navigation menu while scrolling down. Our task is to hide the navigation menu while scrolling down and show it when scrolling up. This creates a smooth user experience by maximizing content space while keeping navigation accessible. Creating Structure of Navigation Menu Using HTML Styling the Navigation Menu Using ...

Read More

How to create a clickable dropdown menu with CSS and JavaScript?

Aman Kumar
Aman Kumar
Updated on 15-Mar-2026 15K+ Views

To create a clickable dropdown menu with CSS and JavaScript, you can build an interactive navigation component that saves space while providing easy access to multiple options. This approach helps keep your webpage clean and organized without overwhelming users with too many visible elements. In this tutorial, we'll create a dropdown menu with a toggle button and multiple navigation links, demonstrating the complete process from HTML structure to JavaScript interactivity. Steps to Create a Clickable Dropdown Menu We will follow these three essential steps to build our dropdown menu: Structuring the ...

Read More

Removing an element from an Array in Javascript

Sharon Christine
Sharon Christine
Updated on 15-Mar-2026 530 Views

Removing an element from an array in Javascript can be achieved using various approaches. Removal of an element can be done from the beginning, end or from any specific position. We will be understanding various approaches for removing elements from an array in Javascript based on our needs. In this article, we are working with an array of numbers and our task is to remove elements from an array in Javascript using different methods. ...

Read More

How to Add New Value to an Existing Array in JavaScript?

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

To add new value to an existing array in Javascript, it can be achieved using various ways. We will be understanding seven different approaches for adding a new element to existing array. In this article we are having an array of numbers and our task is to add new value to an existing array in JavaScript. Approaches to Add New Value to Existing Array Here is a list of approaches to add new value to an existing array in JavaScript which we will be discussing in this article with stepwise explanation and complete example codes. ...

Read More

How do you Convert a String to a Character Array in JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 7K+ Views

Converting a string to a character array in JavaScript is useful when you want to iterate over each character or manipulate individual characters. JavaScript provides several built-in methods and techniques to accomplish this transformation. In this article, we'll explore five different approaches to convert a string to a character array in JavaScript, each with its own advantages and use cases. Approaches to Convert String to Character Array Here are the five methods we'll cover with complete examples and explanations: Using split() Method Using Array.from() Method ...

Read More

JavaScript - Creating a Custom Image Slider

Disha Verma
Disha Verma
Updated on 15-Mar-2026 1K+ Views

An image slider is a user interface component in JavaScript that allows users to view a series of images in a slideshow format. It is also known as a carousel or slideshow. An image slider consists of navigation buttons (such as next and previous buttons) that allow users to navigate from one image to the other. With the help of basic HTML for structuring and CSS for designing or making the image slider presentable, along with simple JavaScript logic, you can create an image slider efficiently. This article will guide you through creating a basic image slider with navigation ...

Read More

JavaScript program to update DOM

Disha Verma
Disha Verma
Updated on 15-Mar-2026 861 Views

JavaScript is a powerful tool for dynamically updating the Document Object Model (DOM) of a web page. The Document Object Model (DOM) is an important part of web development that allows changing the structure, content, and style of a webpage. This article explains how to update the DOM using different methods and provides examples. Understanding the DOM DOM stands for Document Object Model. The DOM represents a webpage as a tree structure, where each element is a node. JavaScript allows developers to select, modify, and manipulate these elements in real time, making web pages dynamic and interactive. ...

Read More
Showing 3271–3280 of 8,010 articles
« Prev 1 326 327 328 329 330 801 Next »
Advertisements