Articles on Trending Technologies

Technical articles with clear explanations and examples

TypedArray.name property in JavaScript

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

The name property of TypedArray constructors returns a string representing the name of the typed array type. This property is available on all TypedArray constructors like Int8Array, Uint8Array, Float32Array, etc. Syntax TypedArrayConstructor.name Where TypedArrayConstructor is one of: Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, or BigInt64Array, BigUint64Array. Return Value Returns a string containing the name of the TypedArray constructor. Example TypedArray name Property var nameOfarray1 = Float32Array.name; ...

Read More

How to remove the 0th indexed element in an array and return the rest of the elements in JavaScript?

Nikhilesh Aleti
Nikhilesh Aleti
Updated on 15-Mar-2026 971 Views

Arrays in JavaScript are zero-indexed data structures where elements can be accessed using their index positions. The first element is at index 0, the second at index 1, and so on. const colors = ["Green", "Maroon", "Blue"]; // Index: 0 1 2 This article explores different methods to remove the first element (at index 0) from an array and return the remaining elements. Using the shift() Method The shift() method removes the first element from an array ...

Read More

Insert a specified HTML text into a specified position in the JavaScript document?

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

The insertAdjacentHTML() method allows you to insert HTML content at specific positions relative to an existing element in the DOM. This method provides four position options and is more efficient than using innerHTML for adding content. Syntax element.insertAdjacentHTML(position, text); Parameters element − The target HTML element where content will be inserted position − One of four values: "beforebegin", "afterbegin", "beforeend", "afterend" text − The HTML string to insert Position Options Explained Target Element ...

Read More

Insert a word before the file name's dot extension in JavaScript?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 506 Views

To insert a word before a file's extension, you can split the filename on the dot (.) and then reconstruct it with the new word. This technique is useful for creating versioned files, adding timestamps, or modifying filenames programmatically. Basic Example Let's start with a simple example where we insert "programming" before the ".js" extension: var actualJavaScriptFileName = "demo.js"; var addValueBetweenFileNameAndExtensions = "programming"; console.log("The actual File name = " + actualJavaScriptFileName); var [fileName, fileExtension] = actualJavaScriptFileName.split('.'); var modifiedFileName = `${fileName}-${addValueBetweenFileNameAndExtensions}.${fileExtension}`; console.log("After adding into the file name:"); console.log(modifiedFileName); The actual File ...

Read More

TypedArray.buffer property in JavaScript

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

The buffer property of TypedArray instances provides access to the underlying ArrayBuffer object that stores the binary data for the typed array. Syntax typedArray.buffer Return Value Returns the ArrayBuffer object that backs the TypedArray instance. Example JavaScript Example var buffer = new ArrayBuffer(156); var float32 = new Float32Array(buffer); document.write("Buffer byte length: " + float32.buffer.byteLength); ...

Read More

Convert the string of any base to integer in JavaScript

Ayush Gupta
Ayush Gupta
Updated on 15-Mar-2026 221 Views

The parseInt() function in JavaScript converts strings representing numbers in any base (2-36) to decimal integers. This is useful when working with binary, octal, hexadecimal, or other numeral systems. Syntax parseInt(string, radix); Parameters string − The value to parse. If not a string, it's converted using the ToString method. Leading whitespace is ignored. radix − An integer between 2 and 36 representing the base of the numeral system. If omitted, defaults to 10 (except for strings starting with "0x" which default to 16). Examples Converting Different Bases to Decimal ...

Read More

First class function in JavaScript

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 755 Views

JavaScript treats functions as first-class citizens, meaning they can be stored in variables, passed as arguments, and returned from other functions. This powerful feature enables functional programming patterns and higher-order functions. What are First-Class Functions? In JavaScript, functions are first-class objects, which means they have all the capabilities of other objects. They can be: Stored in variables and data structures Passed as arguments to other functions Returned as values from functions Assigned properties and methods Storing Functions in Variables First-Class Functions // Store function ...

Read More

How to set all the border bottom properties in one declaration in JavaScript DOM?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 214 Views

To set all border bottom properties in one declaration using JavaScript DOM, use the borderBottom property. This property allows you to simultaneously set the border-bottom-width, border-bottom-style, and border-bottom-color in a single statement. Syntax element.style.borderBottom = "width style color"; Parameters The borderBottom property accepts a string value containing three space-separated components: width: Border thickness (e.g., "thin", "medium", "thick", "2px", "5px") style: Border style (e.g., "solid", "dashed", "dotted", "double") color: Border color (e.g., "red", "#ff0000", "rgb(255, 0, 0)") Example Here's how to set border bottom properties using JavaScript: ...

Read More

MediaStream in HTML5

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 429 Views

The MediaStream represents synchronized streams of media content in HTML5. It provides access to audio and video tracks from sources like microphones and webcams. When there are no audio tracks, it returns an empty array, and for video streams, if a webcam is connected, stream.getVideoTracks() returns an array containing MediaStreamTrack objects representing the webcam stream. Getting User Media Access The navigator.mediaDevices.getUserMedia() method is the modern way to access media streams. It returns a Promise that resolves with a MediaStream object: Start Audio async function startAudio() { try { ...

Read More

Create a small-caps effect for CSS

Abhinaya
Abhinaya
Updated on 15-Mar-2026 575 Views

To create a small-caps effect in CSS, use the font-variant property with the value small-caps. This transforms lowercase letters into smaller uppercase letters while keeping original uppercase letters at their normal size. Syntax font-variant: small-caps; Example Here's how to apply the small-caps effect to text: .small-caps { font-variant: small-caps; font-size: 18px; ...

Read More
Showing 18721–18730 of 61,297 articles
Advertisements