Xah Web Dev Blog Archive 2026-01 to 2026-03

xtodo

Ebay now click opens a new tab.

ebay 2026-02-20 rqhZ6
ebay 2026-02-20 rqhZ6
xtodo
xtodo
xtodo
FULLWIDTH AMPERSAND in html 2026-02-16 25226
FULLWIDTH AMPERSAND in html 2026-02-16 25226

changed all console log to assert.

xtodo
xtodo

updated.

updated.

updated.

added print to pages with code example of simple expression. e.g. now has console.log or console.assert. because, code example with just expression is intuitive to illustrate some syntax, but often does not make sense as a independent script. e.g. if you have multiple expression, each on a line, e.g.

js simple expression code sample 2026-02-03 1eb69
js simple expression code sample 2026-02-03 1eb69

in real life, such code of just expression per line does not exist, in fact maybe invalid code due to missing semicolon.

So now, add console.log to print them. This gives the code more of intention. in many cases, console.assert instead console.log, it indicate a particular property we are trying to illustrate.

also, general update on content.

major updates. lots major rewrites.

lots livestream on js in past weeks.

updated.

JS coding example. codepoint to utf16 encoding (2026)

🟢 TIP: treat js array-like thing as a monster. Whenever you see it, convert it to true array as soon as possible. this way, you don't have to deal with its special behaviors.

JavaScript design problem. Property Descriptor default values

const xx = { "a": "a", "b": "b" };

const yy = Object.create(Object.prototype, { "a": { value: "a", writable: true, enumerable: true, configurable: true }, "b": { value: "b", writable: true, enumerable: true, configurable: true } });

console.log(xx);
// { "0": "a", "1": "b" }

console.log(yy);
// { "0": "a", "1": "b" }

another mega update




more massive updates

updated

massive updates

replaced all Object.prototype.hasOwnProperty by Object.hasOwn

lots major updates

mega updates.

xtodo

JavaScript abomination, or rather, the abomination of references in programing languages

in JavaScript, regex is always new, never equal.

// JavaScript abomination, or rather, the abomination of references
// regex object are never equal

console.log(RegExp("x") === RegExp("x"));
// false

console.log(RegExp("x").source === RegExp("x").source);
// true

in which programing language regex are never equal, like in JavaScript (/🦋/ === /\u{1F98B}/)

in which programing language regex are never equal, like in JavaScript (/🦋/ == /x/)

xtodo