Articles on Trending Technologies

Technical articles with clear explanations and examples

Implementing GraphQL Subscriptions for Real-Time Data Updates in JavaScript

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 278 Views

In today's fast-paced world, real-time data updates are becoming increasingly crucial for modern web applications. One popular solution for achieving real-time functionality is GraphQL subscriptions. In this article, we will explore how to implement GraphQL subscriptions in JavaScript, providing code examples, explanations, and a comprehensive understanding of the topic. Understanding GraphQL Subscriptions GraphQL is an open-source query language for APIs and a runtime for executing these queries with existing data. It allows clients to request specific data from the server, enabling efficient and flexible communication between the client and the server. While GraphQL queries and mutations are used ...

Read More

JavaScript program to generate all rotations of a number

Alshifa Hasnain
Alshifa Hasnain
Updated on 15-Mar-2026 729 Views

In this article, we will learn to generate all rotations of a number in JavaScript. A rotation involves moving the first digit to the end of the number, creating all possible circular arrangements of the digits. Problem Statement Given a number, we need to generate all possible rotations of its digits. A rotation is defined as moving the first digit to the end of the number. Input: 123 All Rotations: 123 (original number) 231 (first rotation: move 1 to the end) 312 (second ...

Read More

Replace elements by its rank in the array in JavaScript

AYUSH MISHRA
AYUSH MISHRA
Updated on 15-Mar-2026 4K+ Views

In this problem, we are given an array, and we have to replace each element with its rank. The rank of an element is the position of the element when the array is arranged in sorted order with unique values only. In this article, we are going to learn about various approaches to replacing elements with their rank in an array using JavaScript. Below are the examples to understand the problem clearly: Example 1 Input: arr = [40, 10, 20, 30] Output: [4, 1, 2, 3] Explanation: The sorted, unique array is: [10, 20, ...

Read More

Implementing Real-Time Chat Applications with Socket.io and JavaScript

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 412 Views

Real-time communication is a crucial aspect of many modern web applications. Whether it's an instant messaging platform, a collaborative tool, or a live support system, the ability to exchange messages in real-time enhances user experience and promotes efficient collaboration. Real-time chat applications allow users to engage in interactive conversations, share information, and stay connected with each other in real-time. Implementing real-time chat functionality in web applications traditionally involved complex and low-level protocols, such as WebSockets, that required deep understanding and implementation effort. However, with the advent of libraries like Socket.io, the process has become significantly simplified. Socket.io is ...

Read More

Implementing Real-Time Collaboration in JavaScript Applications

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 761 Views

Real-time collaboration has become an essential feature in modern web applications. It allows multiple users to work together simultaneously, making it easier to collaborate and communicate in real-time. JavaScript, being the dominant language for web development, provides a variety of tools and frameworks to implement real-time collaboration seamlessly. In this article, we will explore different techniques and technologies to implement real-time collaboration in JavaScript applications. WebSockets WebSockets provide a bi-directional communication channel between a client and a server, enabling real-time data transfer. It allows the server to push updates to connected clients instantly, eliminating the need for continuous ...

Read More

Implementing Real-Time Data Visualization with JavaScript and Charting Libraries

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 819 Views

In today's data-driven world, the ability to visualise real-time data is crucial for businesses and developers alike. Real-time data visualisation allows us to gain insights, monitor trends, and make informed decisions based on up-to-date information. JavaScript, being a versatile and widely-used programming language, provides excellent tools and libraries for implementing real-time data visualisation. In this article, we will explore how to leverage JavaScript and popular charting libraries to create dynamic and interactive data visualisations that update in real time. Getting Started with JavaScript Charting Libraries To kick off our real-time data visualisation journey, let's first choose a ...

Read More

JavaScript Algorithms: Sorting, Searching, and Graph Traversal

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 830 Views

JavaScript is a versatile programming language widely used for web development. While it is known for its ability to enhance the interactivity of web pages, JavaScript also provides powerful algorithms for sorting, searching, and graph traversal. These algorithms are essential in solving complex problems efficiently. In this article, we will explore advanced JavaScript algorithms, including sorting algorithms like quicksort and mergesort, searching algorithms like binary search, and graph traversal algorithms like breadth-first search and depth-first search. Sorting Algorithms Sorting algorithms play a crucial role in organizing data in a specific order. JavaScript offers several efficient sorting algorithms, two ...

Read More

How to splice an array without mutating the original Array?

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

In JavaScript, the splice() method modifies the original array by adding, removing, or replacing elements. However, sometimes you need to perform splice operations without changing the original array. This tutorial demonstrates three effective approaches to splice arrays while preserving the original data. Understanding the splice() Method The splice() method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place. Syntax array.splice(startIndex, deleteCount, item1, item2, ..., itemN) Parameters startIndex − The index at which to start changing the array deleteCount − The number of ...

Read More

How to dynamically insert id into a table element using JavaScript?

Dishebh Bhayana
Dishebh Bhayana
Updated on 15-Mar-2026 2K+ Views

In this article, we will learn how to dynamically insert IDs into table elements using JavaScript with the help of various DOM manipulation techniques. In web development, dynamically inserting an ID into an HTML table element can be a useful technique when we need to uniquely identify and manipulate specific rows or cells. By assigning IDs to table elements programmatically, we gain more control and flexibility in accessing and modifying the table's content. Let's understand how to implement this with the help of some examples. Method 1: Using the id Property In this example, we generate ...

Read More

How to Trigger a File Download when Clicking an HTML Button or JavaScript?

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

To trigger a file download when clicking an HTML button or JavaScript, is a very common and important part of web page where users can directly download the file they want by clicking a button or link. We will be understanding four different approaches to achieve this. In this article, we are having a button in our HTML document and our task is to trigger a file download when clicking an HTML button or JavaScript. Approaches to trigger file download Here is a list of approaches to trigger a file download when clicking an HTML button or ...

Read More
Showing 14231–14240 of 61,297 articles
Advertisements