14
Articles
8月21日 03:01
Last updated
No Image

Learning web development: Booleans, comparisons and <code>if</code> statements

In this chapter, we learn about tools for only running a piece of code if a condition is met: truth values (booleans), comparisons and if statements.

2ality
library tool
No Image

Learning web development: Arrays in JavaScript

In this chapter we look at one way of storing more than one value in a variable: arrays.

2ality
library tool
No Image

Learning web development: strings and methods in JavaScript

In the last chapter, we worked with numbers. In this chapter, we’ll work with text and write our first applications.

2ality
tool ui
No Image

Learning web development: numbers, variables, functions in JavaScript

In this chapter, we take the very first steps with JavaScript and learn about numbers, variables and functions.

2ality
library tool
No Image

New series of blog posts: learning web development

This blog post provides an overview of my new series of blog posts called “Learning web development”.

2ality
framework tool
No Image

Ecma International approves ECMAScript 2025: What’s new?

On 25 June 2025, the 129th Ecma General Assembly approved the ECMAScript 2025 language specification (press release), which means that it’s officially a standard now. This blog post explains what’s new.

2ality
library tool
No Image

Tips for making regular expressions easier to use in JavaScript

In this blog post, we explore ways in which we can make regular expressions easier to use.

2ality
tool
No Image

TypeScript: checking Map keys and Array indices

JavaScript has two common patterns: Maps: We check the existence of a key via .has() before retrieving the associated value via .get(). Arrays: We check the length of an Array before performing an indexed access. These patterns don’t work as well in TypeScript. This blog post explains why and presents alternatives.

2ality
library tool
No Image

TypeScript: supporting the new class <code>Iterator</code> at the type level

In ECMAScript 2025, JavaScript gets a class Iterator with iterator helper methods. This class conflicts with TypeScript’s existing types for iterators. In this blog post, we explore why that is and how TypeScript solves that conflict.

2ality
library tool
No Image

Styling console text in Node.js

In this blog post, we explore how we can style text that we log to the console in Node.js. Some of the examples use a Unix shell but most of the code should also work on Windows.

2ality
api library tool
No Image

Converting values to strings in JavaScript has pitfalls

Converting values to strings in JavaScript is more complicated than it might seem: Most approaches have values they can’t handle. We don’t always see all of the data.

2ality
No Image

Deploying TypeScript: recent advances and possible future directions

In this blog post we look at: The current best practice for deploying library packages: .js, .js.map, .d.ts, .d.ts.map, .ts Recent new developments in compiling and deploying TypeScript: type stripping, isolated declarations, JSR, etc. What the future of deploying TypeScript might look like: type stripping in browsers, etc.

2ality
No Image

Ideas for making TypeScript better at testing types

In this blog post, we examine how we can test types in TypeScript: First, we look at the library asserttt and the CLI tool ts-expect-error. Then, we consider which functionality could be built into TypeScript.

2ality
No Image

Could JavaScript have synchronous <code>await</code>?

In JavaScript, code has color: It is either synchronous or asynchronous. In this blog post, we explore: The problems caused by that How to fix them via synchronous await The two downsides that prevent synchronous await from being practical

2ality