Xah JS Blog
2026 blog highlights
- JS DOM: Node, Node Type
- JS DOM: Node Type
- JS DOM: NodeList vs HTMLCollection
- JS DOM: Whitespace Nodes
- HTML: Doctype
- JS: DOM Methods
- JS DOM: Get Element by ID, Name, Class etc
- JS DOM: Loop thru nodes
- JS DOM: Get Parent, Child, Sibling
- JS DOM: Insert Element
- made correct TypeScript
- CSS: Box Shadow
lots misc updates.
new and misc updates.
- π JS: console.assert
- JS: Number.isFinite
- JS: Test Equality
- JS: Arithmetic Operators
- JS: Print (console.log)
- JS: Proxy constructor
In the object reference pages, each of standard object and their prototype function pages, the left panel now is generic JavaScript panel, not object reference items. This is more useful. To see a list of all standard object, just goto the object reference page.
finally, finished the proxy tutorial of 2015.
- π JS: Define method
updated.
from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/extends
major rewrite. added class private fields etc of js 2022.
- π JS: Class Private Fields and Methods
- JS: Define Class
- JS: Class Expression
- JS: Class static fields and methods
updates.
the JavaScript warts, added in 2022 even, seems unending.
now u got class jargons of fields, members, properties, methods. very confusing. (and instance version of each also known as prototype members, and static version of each). and private version of each. (you wanna call them private VARIABLES, because that is what they really are. but they are fields, and you got static version of private fields.)
you also got static blocks, and init blocks.
the complexity surpasses the machinery of object oriented programing in java .
and you got this special case syntax in-operator (#x in obj) that can only be used in class body. am currently unsure wtf it is needed, besides the abuse of in operator ad-hoc syntax cancer like cpp. (heavy asking ai to halp this puny meat man but takes long time to understand) also currently unsure what static block and init blocks are good for. working on it.
updated.
- JS: Iterator Object
- JS: Iterator.from
- JS: Iterator.prototype.toArray
- JS: Iterator.prototype.forEach
- JS: Iterator.prototype.map
- JS: Iterator.prototype.flatMap
- JS: Iterator.prototype.reduce
- JS: Iterator.prototype.filter
- JS: Iterator.prototype.take
- JS: Iterator.prototype.drop
- JS: Iterator.prototype.every
- JS: Iterator.prototype.some
- JS: Iterator.prototype.find
updated
updated.
updates
update all string related pages.
update all array related pages and more.
updating all pages in
also updated:
- JS: All operations on property
- JS: Object.hasOwn β
- JS: Reflect.construct
- JS: Reflect.deleteProperty
- JS: Reflect.get
- JS: Reflect.has
- JS: Reflect.set
- JS: Reflect .getOwnPropertyDescriptor
- JS: βinβ operator π
and lots randomish updates
- JS: Reflect.getPrototypeOf
- JS: Reflect.setPrototypeOf
- JS: String.prototype.at (get char at index) β
- JS: βnewβ operator
- JS: Show Prototype Chain π
- JavaScript style guide for functional programing
- JS: Object Literal Expression vs Object.Create
- JS: βtypeofβ operator
- JS: undefined
- JS: Array (overview)
- JS: Array.prototype.forEach
- JS: for-in Loop π
- JS: Iterable Object
updated all pages in the object section.
also updated this and all links in it:
new index pages.
- π JS: Array. Index
- π JS: Object. Index
- π JS: Function. Index
- π JS: String. Index
- π JS: Property. Index
- π JS: Iterable. Index
- π JS: Module. Index
updates:
what's the qem in chrome css
what's the qem in chrome css.
h3 { display: block; font-size: 1.17em; margin-block-start: 1__qem; margin-block-end: 1em; margin-inline-start: 0; margin-inline-end: 0; font-weight: bold; }
JavaScript object.created is badly designed.
to write
{ k: 1 }
you have to
Object.create( Object.prototype, { k: { value: 1, enumerable: true, configurable: true, writable: true } } )
so nobody use it.
misc updates
pattern matching coming to JavaScript
css nesting syntax is fantastic. make things easier to read.
3 years ago, i was against. because non-linear linear syntax has advantages like in shell languages. nested syntax is complicated to edit.
major rewrite.
- π JS: Function (basics)
- JS: Arrow Function
- JS: βfunctionβ keyword
- JS: βfunctionβ name hoisting
- JS: βfunctionβ declaration vs expression
- JS: βargumentsβ object in βfunctionβ
- JS: βfunctionβ call, apply, bind
- JS: Function parameters
- JS: Function rest-parameters
- JS: Function parameters default values
- JS: Function parameters binding pattern
- JS: Closure
- JS: Functional Programing
- JS: Function Pipe π
- JS: Function (class)
- JS: Function Constructor
- JS: Function.prototype
major rewrite:
minor updates. make the basics sections better.
minor updates
remove of redundant === true in assertion.
remove all redundant === true in console.assert. was using them because i thought it provides clarity, symmetric with === false. but now i think shorter code is more clear.
- JS: Test Equality of Array and Object by Content π
- JS: Split Array π
- JS: Property key "prototype"
- JS: Number Comparison Operators
- JS: Boolean Constructor
- JS: Reflect .preventExtensions
- JS: Reflect .getOwnPropertyDescriptor
- JS: Object.setPrototypeOf π
- JS: RegExp.prototype.unicode (flag u)
- JS: βinstanceofβ operator
- JS: Regular Expression Flags
- JS: Array.prototype.length
- JS: Number.isFinite
- JS: Number.isSafeInteger
- JS: Reflect.has
- JS: βdeleteβ operator π
- JS: βinβ operator π
- JS: isFinite π
- JS: Object Literal Expression vs Object.Create
- JS: Sparse Array
- JS: Object.hasOwn β
- JS: Object.isExtensible π
- JS: Object.isSealed
- JS: Object .prototype .hasOwnProperty π
- JS: Object.seal
- JS: String.prototype.includes
- JS: WeakMap
- JS: WeakSet
- JS: Problems of testing array equality as json string
- JS: Array.prototype
- JS: Dot vs bracket syntax for property access
- JS: Test is object type
- JS: Test Equality of Map Objects π
- JS: Number Constructor
- JS: Object extensible, seal, freeze
- JS DOM: Stopwatch
- JS: undefined
old article. now they been fixed
more updates.
major rewrite on js class.
- JS: Define Class
- JS: Class extends (subclassing)
- JS: βsuperβ keyword
- JS: Define class by function
- JS: Class static fields and methods
updates:
old blog article now on its own page.
updates.
- added Key without value shorthand. somehow i missed knowing this feature in ECMAScript 2015.
- JS: Object Literal Expression
- JS: ECMAScript 2015
Math essence of promise
finally unstand promise after 10 years.