Web Development Articles

Page 300 of 801

How to create Hamburger Menu for mobile devices?

Rushi Javiya
Rushi Javiya
Updated on 15-Mar-2026 2K+ Views

The hamburger menu icon has three horizontal bars that expand and collapse navigation menus on mobile and tablet devices. This tutorial teaches you to create responsive hamburger menus using HTML, CSS, JavaScript, and Bootstrap. We'll cover two approaches: a custom implementation from scratch and a Bootstrap-based solution for faster development. Creating a Custom Hamburger Menu Follow these steps to build a hamburger menu without external libraries: Step 1 − Create a container div with navbar and expandable menu sections. Step 2 − Add a header div containing the menu icon and logo/text elements. Step 3 ...

Read More

How to use Selenium Web Driver and JavaScript to Login any website?

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

Nowadays, automation is very useful for testing applications. Many automation tools are available, and Selenium is one of them, developed in 2004. Also, it is a cross-platform tool, so we can use Selenium with most programming languages, and here we will use it with JavaScript. Users need to create a Node.js application to use the Selenium WebDriver with JavaScript. Setting Up Node.js Application Follow these steps to create a Node.js application for Selenium automation: Step 1: Initialize a new Node.js project npm init -y Step 2: Install the Selenium WebDriver package ...

Read More

Computing the Cartesian Product of Two Sets in JavaScript

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 380 Views

In set theory, a Cartesian product is a mathematical operation that returns a set from multiple sets. For sets A and B, the Cartesian product A × B is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B. We need to write a JavaScript function that takes two arrays representing distinct sets and returns a 2-D array containing their Cartesian product. What is Cartesian Product? The Cartesian product creates all possible combinations between elements of two sets. If set A has m elements and set B has n elements, the ...

Read More

How to setup Video.js with JavaScript?

Prince Yadav
Prince Yadav
Updated on 15-Mar-2026 2K+ Views

In this tutorial, we're going to learn how to set up Video.js using JavaScript. We'll also have a look at a few examples for better understanding. Video.js is a popular and easy-to-use modern web video player built on HTML5. It provides enhanced features and functionality for web video players, supporting various video formats including standard HTML5 formats and modern formats like YouTube, Vimeo, and Flash. It works seamlessly across all display sizes including desktops and mobile devices. Installing Video.js Video.js is officially available through CDN and npm (node package manager). Let's look at both installation methods. ...

Read More

Create a to-do list with JavaScript

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

A TODO list is a simple application that helps users keep track of tasks they need to complete. It typically allows users to add new tasks, mark them as completed, edit existing tasks, and delete unnecessary ones. In this tutorial, we'll learn how to create a functional to-do list using JavaScript. Our to-do list will support the following core features: Add new tasks Delete tasks Mark tasks as completed Edit existing tasks Basic To-Do List Implementation Let's start with a simple example ...

Read More

Apply an IF condition to every element in an HTML table with JavaScript?

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

HTML tables are created using the tag with for table rows and for data cells. JavaScript allows you to apply conditional logic to each table element dynamically. This article demonstrates how to use JavaScript to apply if conditions to every element in an HTML table, enabling dynamic content modification based on specific criteria. Using document.querySelectorAll() with forEach() The document.querySelectorAll() method returns a static NodeList of all elements matching the specified CSS selector. Combined with forEach(), it allows you to iterate through table elements and apply conditions. Syntax document.querySelectorAll(selector).forEach(function(element) { ...

Read More

How to iterate json array - JavaScript?

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

In JavaScript, iterating over JSON arrays is a common task when working with data from APIs or configuration files. A JSON array is an ordered list of values that can contain strings, numbers, booleans, objects, or other arrays. This article demonstrates various methods to iterate through JSON arrays in JavaScript, from traditional loops to modern ES6+ approaches. Understanding JSON Arrays JSON arrays are ordered collections of values enclosed in square brackets. Each element is separated by commas and can be accessed using numeric indices. Syntax [ { ...

Read More

Accessing and returning nested array value - JavaScript?

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

Each value in an array is referred to as an element, and each element has a certain numerical location in the array, which is referred to as its index. Nested Arrays, a feature of JavaScript, allow us to create arrays inside arrays. One or more arrays can be used as the elements of nested arrays. Although the term may be a little unclear, as we look further, it is actually rather fascinating. Understanding Nested Arrays In JavaScript, a nested array is described as an Array (outer array) inside another array (inner array). One or more inner arrays ...

Read More

Setting a default variable value to undefined in a function - JavaScript?

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

The task we are going to perform in this article is setting a default variable value to undefined in a function. Before we jump into the article, let's understand what are functions in JavaScript. One of the core components of JavaScript are functions. In JavaScript, a function is comparable to a procedure-a collection of statements that carry out an action or compute a value. However, in order for a process to be considered a function, it must accept an input and produce an output with an evident connection between the input and the result. Let's see how to ...

Read More

Return correct value from recursive indexOf in JavaScript?

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 445 Views

A computer pattern or idea called recursion is present in many programming languages, including JavaScript. It is a feature used to build a function that repeatedly calls itself, but with a smaller input each time, until the intended outcome of the code is realized. In this article, we will return the correct value from a recursive indexOf() function in JavaScript. Let's dive into the article for a better understanding. Understanding Recursive indexOf Implementation The position of the first occurrence of a value in a string or array is returned by the indexOf() method. -1 is returned by ...

Read More
Showing 2991–3000 of 8,010 articles
« Prev 1 298 299 300 301 302 801 Next »
Advertisements