Articles on Trending Technologies

Technical articles with clear explanations and examples

Why JavaScript Data Types are Dynamic?

Sravani S
Sravani S
Updated on 15-Mar-2026 277 Views

JavaScript is a dynamically typed language, which means variables can hold different data types during program execution. Unlike statically typed languages where you must declare a variable's type upfront, JavaScript determines the type at runtime based on the assigned value. What Does Dynamic Typing Mean? In JavaScript, you don't need to specify whether a variable will store a string, number, or boolean. The same variable can be reassigned to hold completely different data types throughout the program. Example var val; ...

Read More

Which is the JavaScript RegExp to find any alternative text?

Nikitha N
Nikitha N
Updated on 15-Mar-2026 291 Views

To match any of the specified alternatives in JavaScript, use the alternation operator | within parentheses. This pattern allows you to find multiple possible text options in a single regular expression. Syntax (option1|option2|option3) The pipe symbol | acts as an OR operator, matching any one of the alternatives listed within the parentheses. Example Here's how to find alternative text patterns using JavaScript RegExp: JavaScript Regular Expression var myStr = "one, ...

Read More

Set the Background Attachment with CSS

Ramu Prasad
Ramu Prasad
Updated on 15-Mar-2026 141 Views

The background-attachment property controls whether a background image scrolls with the content or remains fixed in the viewport. This CSS property is useful for creating parallax effects or keeping decorative backgrounds stationary. Syntax background-attachment: value; Property Values Value Description scroll Background scrolls with content (default) fixed Background stays fixed in viewport local Background scrolls with element's content Example: Fixed Background This example demonstrates a fixed background that remains stationary while content scrolls: ...

Read More

Bootstrap Form select

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

A select dropdown is used when you want to allow users to pick from multiple options. By default, it only allows one selection, but can be configured for multiple selections. Use for list options with which users are familiar, such as states, countries, or categories. Use multiple attribute to allow users to select more than one option. Bootstrap's form-control class provides consistent styling across browsers. Basic Select Example Here's a simple Bootstrap form with a select dropdown: ...

Read More

decodeURIComponent() function in JavaScript

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 346 Views

The decodeURIComponent() function accepts a string value representing an encoded URI (Uniform Resource Identifier), decodes it, and returns the result. It reverses the encoding done by encodeURIComponent(). Syntax decodeURIComponent(encodedURI) Parameters encodedURI: A string representing an encoded URI component that you want to decode. Return Value Returns a new string representing the decoded version of the given encoded URI component. Example JavaScript Example var encodedData = encodeURIComponent('http://www.qries.com/?x=шеллы'); ...

Read More

How to find the name and the target of a form in JavaScript?

Lokesh Yadav
Lokesh Yadav
Updated on 15-Mar-2026 1K+ Views

In JavaScript, you can access the name and target attributes of HTML forms using DOM properties. These attributes help identify forms and control where form submissions open. The name attribute provides a unique identifier for the form, while the target attribute specifies where to display the response after form submission. Common target values include _self (same window), _blank (new window), _parent, and _top. Syntax To access form properties, use the following syntax: // Get form name document.getElementById('formId').name; // Get form target document.getElementById('formId').target; Example 1: Getting Form Name This example demonstrates how ...

Read More

How to find keys of a hash in JavaScript?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 483 Views

In JavaScript, objects act as hash tables where you can store key-value pairs. To extract all keys from an object, use the built-in Object.keys() method, which returns an array of the object's property names. Syntax Object.keys(object) Parameters object: The object whose keys you want to retrieve. Return Value Returns an array of strings representing the object's own enumerable property names (keys). Example Find Hash Keys ...

Read More

JavaScript get row count of an HTML table

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

Tables are a common way to organize and display data in HTML. If you're working with tables dynamically in JavaScript, you might need to count the rows in an HTML table for various purposes, such as validation, manipulation, or displaying statistics. In this article, we will demonstrate how to retrieve the row count of an HTML table using JavaScript. We will use the rows property to access the row count through rows.length, and also show how to count rows in specific table sections like . Understanding the rows Property The rows property in JavaScript provides access to ...

Read More

How to create Empty Values String in JavaScript?

seetha
seetha
Updated on 15-Mar-2026 3K+ Views

In JavaScript, there are several ways to create empty string values. An empty string is a string with zero characters, represented by two quotation marks with nothing between them. Syntax let emptyString = ""; // Double quotes let emptyString = ''; // Single quotes let emptyString = ``; // Template literals let emptyString = String(); // String constructor Example: Creating Empty Strings ...

Read More

How to perform Multiline matching with JavaScript RegExp?

Moumita
Moumita
Updated on 15-Mar-2026 700 Views

To perform multiline matching in JavaScript, use the m flag with regular expressions. This flag makes ^ and $ anchors match the beginning and end of each line, not just the entire string. Syntax /pattern/m new RegExp("pattern", "m") How the m Flag Works Without the m flag, ^ matches only the start of the string and $ matches only the end. With the m flag, they match line boundaries created by (newline) characters. Example: Basic Multiline Matching JavaScript Regular ...

Read More
Showing 18691–18700 of 61,297 articles
Advertisements