Articles on Trending Technologies

Technical articles with clear explanations and examples

What are the essential tags for an HTML Document?

Shakira Thasleem
Shakira Thasleem
Updated on 15-Mar-2026 2K+ Views

HTML (HyperText Markup Language) is the standard markup language for creating web pages and web applications. Understanding the essential HTML tags is crucial for building properly structured documents that browsers can interpret correctly. An HTML tag consists of three components: an opening tag that marks the start, content that displays in the browser, and a closing tag marked with a forward slash like . All HTML tags should be written in lowercase for best practices. Note: Some HTML tags are self-closing and don't require a closing tag, such as and . Every HTML document requires four ...

Read More

How to invoke a JavaScript Function as a method?

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

In this tutorial, we will learn how to invoke a JavaScript Function as a method. In JavaScript, the code inside a function will execute when the function is invoked. We can invoke a function in a variety of ways. One of them is using the method. The method is a property of an object that has a function value. We can define functions as object methods. This function will have a function name, a parameter (optional), and a return type (optional). It will have a "this" keyword which refers to an object. Users can follow the syntax below ...

Read More

What is JavaScript garbage collection?

Vrundesha Joshi
Vrundesha Joshi
Updated on 15-Mar-2026 418 Views

JavaScript automatically manages memory allocation and deallocation through a process called garbage collection. When you declare variables or create objects, JavaScript allocates memory for them. The garbage collector then identifies and frees memory that is no longer needed by your application. How Garbage Collection Works JavaScript's garbage collector runs automatically in the background, scanning memory to find objects that are no longer reachable or referenced by your code. When these "orphaned" objects are found, their memory is freed up for reuse. Mark-and-Sweep Algorithm The most common garbage collection algorithm in modern JavaScript engines is the mark-and-sweep ...

Read More

HTML5 and Amazon S3 Multi-Part uploads

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 264 Views

Amazon S3 multi-part uploads allow you to upload large files in smaller chunks, providing better reliability and performance. When combined with the HTML5 File API, you can create powerful client-side upload functionality. Overview of S3 Multi-Part Uploads Amazon S3 multi-part upload is a feature that enables you to upload a single object as a set of parts. Each part is a contiguous portion of the object's data, and you can upload these parts independently and in any order. How HTML5 File API Works with S3 The HTML5 File API provides interfaces for accessing files from web ...

Read More

Add elements to a Dictionary in Javascript

Monica Mona
Monica Mona
Updated on 15-Mar-2026 10K+ Views

In JavaScript, there are multiple ways to add elements to a dictionary-like structure. You can use plain objects, custom dictionary classes, or the ES6 Map object. Using Plain Objects The simplest approach is using JavaScript objects as dictionaries. You can add key-value pairs using bracket notation or dot notation: const dictionary = {}; // Using bracket notation dictionary["key1"] = "value1"; dictionary["key2"] = "value2"; // Using dot notation (for valid identifiers) dictionary.key3 = "value3"; console.log(dictionary); { key1: 'value1', key2: 'value2', key3: 'value3' } Custom Dictionary Class You can ...

Read More

How to create and use a Syntax Highlighter with JavaScript?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 364 Views

A syntax highlighter in JavaScript allows you to apply styling to specific code elements like keywords, strings, or HTML tags. This tutorial shows how to create a basic highlighter using regular expressions and DOM manipulation. Example: HTML Link Highlighter This example highlights HTML anchor tags by applying custom CSS styles: body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .colorLinks { color: rgb(131, 44, 212); ...

Read More

Among id, name, xpath and css, which locator should be used?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 15-Mar-2026 460 Views

When selecting locators for web automation, the choice depends on element uniqueness, performance requirements, and traversal needs. Here's a comprehensive guide to choosing the right locator strategy. Locator Priority Order The recommended priority order for locator selection: Priority Locator Reason 1 id Fastest, most reliable if unique 2 name Fast, good for form elements 3 CSS Selector Fast, flexible, good performance 4 XPath Most flexible but slower When to Use Each Locator ID Locator Use when elements have unique IDs. This is the ...

Read More

The onchange event is not working in color type input with JavaScript

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

The onchange event works perfectly with color input elements in JavaScript. When a user selects a different color, the event triggers automatically, allowing you to capture and process the new color value. Syntax Basic Example Color Input onchange Event Choose Color: ...

Read More

Setting property in an empty object using for loop in JavaScript.

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 511 Views

In JavaScript, you can populate an empty object with properties using various loop methods. The most common approaches are the for...in loop and the for...of loop with Object.entries(). Using for...in Loop The for...in loop iterates over all enumerable properties of an object, making it ideal for copying properties from one object to another. Setting Properties with for...in Loop Setting Properties in Empty Object Populate ...

Read More

JavaScript Compare two sentences word by word and return if they are substring of each other

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 227 Views

The idea here is to take two strings as input and return true if one string is a substring of the other, otherwise return false. For example: isSubstr('hello', 'hello world') // true isSubstr('can I use', 'I us') // true isSubstr('can', 'no we are') // false In the function, we check which string is longer and then verify if the shorter string exists as a substring within the longer one. Syntax const isSubstr = (first, second) => { if (first.length > second.length) { ...

Read More
Showing 17971–17980 of 61,297 articles
Advertisements