Articles on Trending Technologies

Technical articles with clear explanations and examples

JavaScript Program for Rotate the matrix right by K times

Aishwarya Mani Tripathi
Aishwarya Mani Tripathi
Updated on 15-Mar-2026 339 Views

The term "perform right rotation on a matrix" refers to shifting each column in the matrix to the right. This operation is repeated "k" times when specified. In other words, it's a right shift of the matrix that occurs "k" times. This program can be implemented using various programming languages but a simple yet effective approach is to consider JavaScript for rotating the matrix right by k times. How to rotate the matrix right by K times? It is straightforward to carry out a right rotation on a matrix by k times, which involves shifting each column of ...

Read More

JavaScript Program for Find the smallest missing number

Saurabh Anand
Saurabh Anand
Updated on 15-Mar-2026 469 Views

We are given a sorted array of distinct non-negative integers, here we have to find the smallest missing number. Hence in this tutorial, we will explore different methods to solve this problem and discuss their time complexities with various examples. Understanding the Problem The problem statement is quite simple. Given a sorted array of distinct non-negative integers, we need to find the smallest missing number in it. Let's take an example to understand the problem. Example Let's say that we have an array [1, 2, 4, 5, 6]. Here, We can see that there is a ...

Read More

JavaScript Program for Search an element in a sorted and rotated array

Aishwarya Mani Tripathi
Aishwarya Mani Tripathi
Updated on 15-Mar-2026 446 Views

When an array is sorted in ascending order and then rotated by some pivot point, it becomes challenging to search for an element using traditional search algorithms. As a developer, you need to find an efficient solution to this problem. In this article, we will guide you through the process of writing a JavaScript program to search for an element in a sorted and rotated array. We will explain the underlying logic and provide you with a step-by-step approach to implementing this program. Problem Statement Before we begin, let's understand the problem statement. We have a sorted ...

Read More

How to check if an object is empty using JavaScript?

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

In JavaScript, checking if an object is empty is a common requirement when working with dynamic data. An empty object contains no properties, and attempting operations on assumed non-empty objects can lead to unexpected behavior. For example, when fetching data from an API, you might receive an empty object if no results are found. Before processing this data, it's essential to verify whether the object contains any properties. We will explore three reliable methods to check if an object is empty in JavaScript. Using Object.keys() Method The Object.keys() method returns an array of all enumerable property ...

Read More

JavaScript Program to Check if all array elements can be converted to pronic numbers by rotating digits

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

Pronic numbers are also known as rectangular numbers, the pronic numbers are numbers that are multiples of two consecutive numbers. We will be given an array of integers and we can rotate the digits in any direction for a certain number of times to get all combinations. For any combination produced by rotating the digit if each array element can be converted into the pronic number then we will print true otherwise false. What are Pronic Numbers? First, let us discuss pronic numbers: pronic numbers are the numbers that are the product of two consecutive numbers. Mathematically saying, if ...

Read More

Explain about IIFEs in JavaScript

Nikesh Jagsish Malik
Nikesh Jagsish Malik
Updated on 15-Mar-2026 420 Views

In the world of JavaScript, there are various techniques and patterns that developers use to write efficient, maintainable code. One such powerful programming technique is the Immediately Invoked Function Expression (IIFE). In this article, we'll dive into IIFEs, their benefits, and how to implement them using different approaches. We'll also explore some practical examples to help you understand their applications in real-world scenarios. What is an IIFE? An IIFE is a function expression that is executed immediately after its definition. It creates its own scope, preventing variables from polluting the global namespace. Syntax (function() { ...

Read More

Advanced DOM Manipulation Techniques with JavaScript

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 2K+ Views

In web development, dynamic and interactive web pages are essential to engage users and provide a seamless browsing experience. JavaScript plays a crucial role in manipulating the Document Object Model (DOM) to create, modify, and delete HTML elements dynamically. In this article, we will explore advanced DOM manipulation techniques using JavaScript, enabling you to take your web development skills to the next level with practical examples and comprehensive theory. Understanding the DOM The DOM represents the structure of an HTML document as a tree-like structure, where each HTML element is a node. JavaScript allows us to interact ...

Read More

JavaScript Program for Searching an Element in a Linked List

Aishwarya Mani Tripathi
Aishwarya Mani Tripathi
Updated on 15-Mar-2026 679 Views

To search for an element in a linked list, we need to go through each node one by one and check if its value matches the target element. If we find the element, we return its position in the list. If not, we return a message saying the element is not found. In this article, our task is to implement a JavaScript program that searches for a specific element in a linked list and returns its position if found, or a message if it is not present. Example Let's look at the below examples: Linked ...

Read More

Which One is Better for Game Development—Python or JavaScript?

Tushar Sharma
Tushar Sharma
Updated on 15-Mar-2026 2K+ Views

Aspiring game developers often face the dilemma of choosing the right programming language for their projects. Two popular contenders in the game development realm are Python and JavaScript. In this article, we will explore the strengths and weaknesses of each language, discuss their suitability for different types of games, and help you determine which language is the better choice for your game development journey. Python: The Versatile Giant Python has earned its reputation as a flexible, beginner-friendly language with a rich ecosystem of libraries and frameworks. Its clean syntax, readability, and ease of use have made it a ...

Read More

How to Build a REST API with Fastify?

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 2K+ Views

Fastify is a high-performance web framework designed for Node.js backend development. Known for its lightweight architecture and impressive speed, Fastify positions itself as a faster alternative to popular frameworks like Express, Koa, and Hapi. What sets Fastify apart is its plugin-centric architecture—everything is treated as a plugin, allowing for better modularity and code reusability. This approach enables developers to encapsulate functionality and distribute it across projects efficiently. In this tutorial, we will explore how to build a complete REST API with Fastify, covering: Creating a basic Fastify server Defining API routes with proper controllers Implementing schema ...

Read More
Showing 14021–14030 of 61,297 articles
Advertisements