Recursion is a powerful programming technique where a function calls itself to solve a problem. In JavaScript, recursion is particularly useful for tasks that involve repetitive subproblems, such as traversing nested structures or implementing mathematical computations. This article explores the concept of recursion, its types, and practical use cases in JavaScript. What is Recursion? Recursion… Continue reading Understanding Recursion in JavaScript
Category: JavaScript
Understanding MutationObserver in JavaScript
In modern web development, manipulating the DOM (Document Object Model) is a common task. While traditional methods like getElementById() or querySelector() can change the content of a web page, sometimes we need a way to observe changes to the DOM without constantly polling or checking for updates manually. This is where the MutationObserver API comes… Continue reading Understanding MutationObserver in JavaScript
Troubleshooting Clickable Area Issues Due to Overlapping Z-Index
When working with web development, one of the most common issues you may encounter is a clickable area that becomes unresponsive or behaves unexpectedly. This often occurs when an element, such as a button or link, is blocked by another element that appears visually above it due to CSS stacking context, particularly related to the… Continue reading Troubleshooting Clickable Area Issues Due to Overlapping Z-Index
Object with key value pair to Array
const RECEPIENTS = { ‘chris’: 21661, ‘sam’: 21628, ‘danna’: 21629, ‘anil’: 3, ‘danny’: 21633, ‘ahap’: ‘aha-shipping@airportapplaincehelp.zendesk.com’, ‘fernanda’: 86081, ‘laura’: ‘laura.martinez@airportappliance.com’, … Continue reading Object with key value pair to Array
Script Context Type Values for each scripts
1. User Event Scripts (UE) Used to determine the action triggering the event: create: A record is being created. edit: A record is being edited. view: A record is being viewed. delete: A record is being deleted. xedit: A record is edited in inline edit mode. approve: A record is being approved. reject: A record… Continue reading Script Context Type Values for each scripts
JavaScript method for invoking interceptable JavaScript object internal methods
The Reflect namespace object contains static methods for invoking interceptable JavaScript object internal methods. Some of the examples are provided below Detecting whether an object contains certain properties const duck = { name: “Maurice”, color: “white”, greeting() { console.log(`My name is ${this.name}`); }, }; Reflect.has(duck, “color”); // true Reflect.has(duck,… Continue reading JavaScript method for invoking interceptable JavaScript object internal methods
HTML code to add toaster
<style> /* Toaster Container */ .toaster { position: fixed; top: 20px; right: 20px; z-index: 9999; } /* Toaster Notification */ .toast { background-color: #333; … Continue reading HTML code to add toaster
Add a PrimeVue library component to an HTML page that uses Vue.js.
Add the script below for using primevue. <script src=”https://unpkg.com/primevue/umd/primevue.min.js”></script> <script src=”https://unpkg.com/@primevue/themes/umd/aura.min.js”></script> const { createApp } = Vue; const app = createApp({ }) app.use(PrimeVue.Config, { theme: { preset: PrimeVue.Themes.Aura, options: { darkModeSelector:… Continue reading Add a PrimeVue library component to an HTML page that uses Vue.js.
Intro to Node’s built-in SQLite module
SQLite in Node makes it easier than ever to persist data with server-side JavaScript. Get started with the node:sqlite module. Node 22.5.0 now bundles SQLite, a lightweight, in-process relational database that requires no additional infrastructure but packs considerable capability. Let’s get to know this handy new built-in feature in Node.js. What is SQLite? Relational databases are a key component… Continue reading Intro to Node’s built-in SQLite module
Node.js performance hooks and measurement APIs
You’ve written and deployed your application and gathered users – congrats! But what’s next? Improvements, getting rid of bottlenecks, increasing execution speed, and more enhancements are in line. In order to make these improvements, you first have to be aware of your app’s existing performance characteristics. Only when you’ve identified the slow parts and the… Continue reading Node.js performance hooks and measurement APIs