Tagged: JavaScript

18 articles tagged JavaScript across all clusters on CodeWalkers.

Programming Beginner

Timers, Ordering, and Race Conditions in JavaScript

setTimeout and setInterval, the order callbacks actually print in, the stale response race that breaks search boxes, debounce and throttle, and cleaning up when the owner disappears.

By Caliph Herald
Programming Beginner

Files, Environment Variables, and Small Automations

Reading and writing files with fs/promises, paths that survive the wrong working folder, keeping keys out of code with env files, and one worked bulk edit with a dry run.

By Caliph Herald
Programming Beginner

Modules, Imports, and Exports in JavaScript

Splitting JavaScript across files: named against default exports, import paths that actually resolve, ES modules against CommonJS, script type module, and load-order surprises.

By Caliph Herald
Programming Beginner

package.json, npm, and Scripts

The fields Node and npm each read, why dependencies and devDependencies are separate lists, naming commands as npm scripts, what a lockfile protects, and when npx is the right tool.

By Caliph Herald
Programming Beginner

Listener Cleanup and Page Lifecycle

removeEventListener and why it so often does nothing, retiring listeners with one AbortController, script defer against DOMContentLoaded, and why these leaks survive a framework.

By Caliph Herald
Programming Beginner

Events, Forms, and User Input in JavaScript

addEventListener and the event object, preventDefault, one delegated listener for a whole list, reading a form with FormData, the browser's own validation, and honest loading states.

By Caliph Herald
Programming Beginner

Running JavaScript with Node

Checking your install and reading version numbers, running a file, what type module changes, reading arguments from process.argv, the two output streams, and exit codes.

By Caliph Herald
Programming Beginner

Fetch, JSON, and the Network in JavaScript

Requesting data with fetch, the response.ok check most tutorials skip, parsing JSON, sending data with POST, telling a bad answer from no usable answer, and timeouts with AbortController.

By Caliph Herald
Programming Beginner

Objects, Arrays, and Destructuring in JavaScript

Object literals and property access, the array methods worth knowing, destructuring, spread and rest, when Map and Set beat a plain object, and copying without mutating.

By Caliph Herald
Programming Beginner

Selecting Elements and Updating the Page

querySelector and querySelectorAll, textContent against innerHTML and when each is safe, adding and removing classes, attributes and data values, and building or deleting elements.

By Caliph Herald
Programming Beginner

Promises and async/await in JavaScript

What a promise is and the three states it can be in, then and catch, the async and await keywords, waiting on overlapping work with Promise.all, and where a thrown error ends up.

By Caliph Herald
Programming Beginner

JavaScript with Node

JavaScript run on your own machine: what Node is, the handful of terminal commands you actually need, and the three guides covering running files, package.json, and file automations.

By Caliph Herald
Programming Beginner

Functions, Callbacks, and Closures in JavaScript

Declarations against expressions, arrow functions and what this binds to, default and rest parameters, callbacks, closures, and functions that take or return functions.

By Caliph Herald
Programming Beginner

JavaScript and the DOM

The JavaScript that changes a web page: finding and updating elements, reacting to clicks and forms, and taking your listeners back off again.

By Caliph Herald
Programming Beginner

JavaScript Async

The JavaScript that runs later: promises and await, fetching data over the network, and the ordering rules behind timers and race conditions.

By Caliph Herald
Programming Beginner

Values, Variables, and Equality in JavaScript

let and const, the primitive types, type coercion, == against ===, truthiness, the difference between null and undefined, and the ?? and ?. operators.

By Caliph Herald
Programming Beginner

JavaScript Language Basics

The four pieces of JavaScript every other page assumes: values and equality, functions and closures, objects and arrays, and modules that split code across files.

By Caliph Herald
Programming Beginner

JavaScript vs TypeScript: Which Should You Learn?

JavaScript and TypeScript are the same language with one big difference: types. Here is what TypeScript actually adds, when the extra step pays off, and which one a beginner should start with.

By Caliph Herald