Front End Technology Articles

Page 326 of 652

JavaScript Detecting a mobile browser

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 258 Views

Detecting mobile browsers in JavaScript is essential for responsive web design and providing device-specific functionality. This can be achieved using the navigator.userAgent property to identify mobile device patterns. Basic Mobile Detection The most common approach uses regular expressions to check the user agent string for mobile device identifiers: Mobile Detection body { font-family: "Segoe ...

Read More

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 522 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

Searching for minimum and maximum values in an Javascript Binary Search Tree

Farhan Muhamed
Farhan Muhamed
Updated on 15-Mar-2026 679 Views

In this article, we will explain how to find the minimum and maximum values in a binary search tree (BST), with implementation in JavaScript. A binary search tree is a data structure that stores data in a sorted order such that for every node, the left subtree contains values less than the node's value, and the right subtree contains values greater than the node's value. So the leftmost node will have the minimum value, and the rightmost node will have the maximum value. Find Minimum and Maximum in a BST Given root node of a binary search ...

Read More
Showing 3251–3260 of 6,519 articles
« Prev 1 324 325 326 327 328 652 Next »
Advertisements