Articles on Trending Technologies

Technical articles with clear explanations and examples

Removing Elements from a Double Linked List using Javascript

Samual Sam
Samual Sam
Updated on 15-Mar-2026 644 Views

Removing an element from a doubly linked list involves updating the pointers of adjacent nodes to bypass the node being removed. There are three main cases to consider based on the position of the element. Three Cases for Removal Removing from head: Update head to point to the second node and remove the previous link from the new head node. Removing from tail: Update tail to point to the second-to-last node and set its next pointer to null. Removing from middle: Connect the previous and next nodes directly, bypassing the current node by updating their pointers. ...

Read More

JavaScript symbol.@@toPrimitive() function

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 190 Views

The Symbol.toPrimitive method defines how an object should be converted to a primitive value when used in operations that require type coercion. This method is called automatically by JavaScript when an object needs to be converted to a primitive type. Syntax object[Symbol.toPrimitive](hint) The hint parameter specifies the preferred type of conversion: "number" - when numeric conversion is preferred "string" - when string conversion is preferred "default" - when no specific preference (used in == comparison) Basic Example Symbol.toPrimitive ...

Read More

How to declare Block-Scoped Variables in JavaScript?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 283 Views

Block-scoped variables are declared using let and const keywords introduced in ES2015. Unlike var, these variables are only accessible within their containing block. Block scope means the variable exists only within the nearest enclosing curly braces {}. Syntax let variableName = value; const constantName = value; Example: Basic Block Scope Block Scoped Variables Block Scoped Variables Demo Test Block Scope ...

Read More

Loading JavaScript modules dynamically

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 262 Views

Dynamic module loading allows you to import JavaScript modules at runtime rather than at compile time. This enables lazy loading, conditional imports, and better performance optimization. Static vs Dynamic Import Static imports happen at the top of files and load immediately. Dynamic imports use the import() function to load modules on demand. Dynamic Module Loading body { ...

Read More

JavaScript map value to keys (reverse object mapping)

Alshifa Hasnain
Alshifa Hasnain
Updated on 15-Mar-2026 1K+ Views

In JavaScript, there are scenarios where we need to reverse the mapping of keys and values in an object, creating a new object where the original values become keys, and the keys become their corresponding values. For example, cities can be grouped by their states. In this article, we'll learn two approaches to achieve this: using Object.keys with iteration and reduce. Using Object.keys() with forEach The first approach involves iterating over the keys of the original object using Object.keys() of Object properties and populating a new object. If multiple keys in the original object share the same value, ...

Read More

How to sum all elements in a nested array? JavaScript

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 2K+ Views

Let's say, we are supposed to write a function that takes in a nested array of Numbers and returns the sum of all the numbers. We are required to do this without using the Array.prototype.flat() method. Let's write the code for this function − Using Recursive Approach const arr = [ 5, 7, [ 4, [2], 8, [1, 3], 2 ], [ 9, [] ], 1, 8 ]; const findNestedSum = ...

Read More

Child node count in JavaScript?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 770 Views

In JavaScript, you can get the count of child elements using the children.length property. This property returns the number of direct child elements, excluding text nodes and comments. Syntax element.children.length Example: Counting Child Elements Child Node Count Example List Of Subject Names are as follows: Javascript MySQL ...

Read More

How to remove two parts of a string with JavaScript?

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

This tutorial teaches us how to remove the text part between two parts of a string with JavaScript. We are given two ends that can be a string or a character and we need to remove the string lying in between them. We will use regular expressions with JavaScript's replace() method to accomplish this task. Syntax Here's the basic syntax for removing part of a string between two characters or sub-strings: var str = "your string here"; var final_str = str.replace(/(first_part).*?(second_part)/, '$1$2'); In the above syntax: first_part - The starting delimiter (string ...

Read More

How to inject JavaScript in WebBrowser control?

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 2K+ Views

To inject JavaScript in WebBrowser control, you need to create a Windows Forms application and use the WebBrowser control's document manipulation capabilities. This allows you to dynamically add JavaScript code to web pages loaded in your application. Prerequisites Create a Windows Forms application in Visual Studio Drag a WebBrowser control to the form Set the Url property of the WebBrowser control Right-click the project, choose Add reference... → COM → Type Libraries Select "Microsoft HTML Object Library" ...

Read More

HTML5+CSS3 Framework like BluePrint/960gs?

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 164 Views

When looking for HTML5+CSS3 frameworks similar to Blueprint or 960gs, you have several modern alternatives that provide responsive grid systems and enhanced styling capabilities. Available Framework Options Here are two notable frameworks that extend beyond traditional grid systems: 52framework Susy 52framework The 52framework (Official Site) is a comprehensive HTML5+CSS3 framework that provides: CSS3 gradients, multiple shadows, and other advanced visual properties CSS3 selectors with Internet Explorer compatibility Enhanced HTML5 video support ...

Read More
Showing 17781–17790 of 61,297 articles
Advertisements