Articles on Trending Technologies

Technical articles with clear explanations and examples

How to Test JavaScript Code Automatically?

Kalyan Mishra
Kalyan Mishra
Updated on 15-Mar-2026 766 Views

Testing JavaScript code automatically helps ensure our code works as intended and catches bugs early in development. This article covers the main types of automated testing and popular frameworks for JavaScript applications. Types of JavaScript Testing Unit Testing Unit testing verifies individual functions, modules, or components in isolation. The goal is to test the smallest pieces of code to ensure they work correctly. Popular JavaScript unit testing frameworks include Jest and Mocha. Integration Testing Integration testing verifies how different parts of your JavaScript code work together. It ensures that various components interact properly when combined. Frameworks like ...

Read More

As a developer, how much do you use JavaScript?

Kalyan Mishra
Kalyan Mishra
Updated on 15-Mar-2026 246 Views

JavaScript is an object-oriented, interpreted scripting language that serves as the backbone of modern web development. It's primarily a client-side scripting language used to create dynamic and interactive websites. While HTML structures web content and CSS handles styling, JavaScript adds functionality like interactivity, animations, and real-time user experiences. Beyond web browsers, JavaScript has expanded into mobile application development, server-side implementation, and game development. Developers frequently use JavaScript with popular front-end frameworks like React.js, Angular.js, and Vue.js to build complex, dynamic web applications. In full-stack development, JavaScript powers both front-end interfaces and back-end services through Node.js. Why We Need ...

Read More

JavaScript Program for Finding Intersection Point of Two Linked Lists

Prabhdeep Singh
Prabhdeep Singh
Updated on 15-Mar-2026 324 Views

In this tutorial, we will discuss two approaches to finding the intersection point of two linked lists in JavaScript. The first approach uses nested loops, and the second approach uses the difference of nodes technique which works in linear time. We will be given two linked lists that may intersect at some point. The intersection point is where both lists share the same node reference (not just the same value). After the intersection point, all subsequent nodes are identical in both lists. Problem Statement Given two linked lists, we need to find the node where they intersect. ...

Read More

Fastest way to convert JavaScript NodeList to Array

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

In this tutorial, we will learn the fastest way to convert JavaScript NodeList to Array. NodeList is a similar structure to an array; it is a collection of DOM (Document Object Model) elements. However, array methods like 'map()', 'filter()', and 'slice()' cannot be used on NodeList objects. There are several ways to convert NodeList to Array, but this task can be done faster using these approaches: Using Array.from() function (Recommended) Using spread operator (...) By iterating with for loop Using Array.from() (Recommended) The Array.from() method ...

Read More

JavaScript Program for Maximum difference between groups of size two

Prabhdeep Singh
Prabhdeep Singh
Updated on 15-Mar-2026 206 Views

In this program, we are given an array of integers with even length. We need to form groups of size two using array elements, then find the maximum difference between the group with the highest sum and the group with the lowest sum. Problem Statement Given an array of even length, we must partition it into groups of size two. Our goal is to find the maximum possible difference between the sum of any two groups. This means finding the highest sum group and the lowest sum group, then returning their difference. Examples Example 1: ...

Read More

How to record and play audio in JavaScript?

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 6K+ Views

Are you also willing to add a custom audio recording feature to your web application? If yes, you are in the right place, as we will learn to record and play audio using JavaScript in this tutorial. Some applications like Discord allow you to record the audio and store it inside that to play it anytime. The recorded audio can also be used as a meme for fun, alerts in the discord meetings, etc. We can also use the MediaRecorder API of JavaScript to add the recording audio feature to our web application. Here, we will learn a ...

Read More

How to Change the Background Color after Clicking the Button in JavaScript?

Gungi Mahesh
Gungi Mahesh
Updated on 15-Mar-2026 20K+ Views

To change the background color after clicking the button in JavaScript, we are going to discuss two different approaches. We have to perform two simple tasks: adding a click event listener and changing the background color of the document. In this article our task is to understand how to change the background color after clicking the button in JavaScript. Approaches to Change Background Color on Clicking Button Here is a list of approaches to change the background color after clicking the button in JavaScript which we will be discussing in this article with stepwise explanation and complete ...

Read More

JavaScript Program for Maximum equilibrium sum in an array

Prabhdeep Singh
Prabhdeep Singh
Updated on 15-Mar-2026 1K+ Views

The equilibrium sum of an array is found at an index where the sum of elements from the start to that index (inclusive) equals the sum of elements after that index. When multiple equilibrium points exist, we need to find the maximum sum among them. Problem Statement Given an array, find the maximum equilibrium sum where: Left sum includes elements from index 0 to current index (inclusive) Right sum includes elements after the current index (exclusive) Left sum equals right sum at the equilibrium point Example ...

Read More

JavaScript Program for Print all triplets in sorted array that form AP

Prabhdeep Singh
Prabhdeep Singh
Updated on 15-Mar-2026 279 Views

AP is the arithmetic progression in which the difference between two consecutive elements is always the same. We will print all the triplets in a sorted array that form AP using three approaches: Naive approach, binary search method and two-pointer approach. Introduction to Problem In this problem we are given a sorted array meaning all the elements are in increasing order. We have to find three elements which are part of the array and form an AP. For example − Given array: [1, 5, 2, 4, 3] From the given array we have triplets like [2, ...

Read More

How to change Input box borders after filling the box using JavaScript?

Gungi Mahesh
Gungi Mahesh
Updated on 15-Mar-2026 2K+ Views

The style.border property is used to change an element's border styling in JavaScript. It allows you to modify the border-color, border-style, and border-width properties dynamically. This is particularly useful for providing visual feedback when users interact with form elements. We use the onchange event to trigger border changes after filling input boxes. The onchange event occurs when the value of an HTML element changes and the element loses focus. This differs from oninput, which fires immediately as the user types. The onchange event works with various form elements including text inputs, radio buttons, checkboxes, and select dropdowns. It's ...

Read More
Showing 14151–14160 of 61,297 articles
Advertisements