Formats sanctioned -and- unit sequences in Intl.NumberFormat.
-and-
Intl.NumberFormat
Sept 2026 Updates:
const nf = new Intl.NumberFormat("en-US", { style: "unit", unit: "foot-and-inch", }); nf.format([5, 11]); // "5 feet, 11 inches" nf.format([-5, -11]); // "-5 feet, 11 inches"
Four list-reading patterns across ECMA-262 & 402 (#19 audit):
"56"
GetIterator
Iterator.zip
TypeError
Intl.ListFormat
Promise.all
"5"
"6"
LengthOfArrayLike
CanonicalizeLocaleList
apply
IsArray
JSON.stringify
Array.from
%TypedArray%.from
const ft = new Intl.NumberFormat("en", { style: "unit", unit: "foot" }); ft.format("56"); // "56 feet" (numeric strings coerced) const fi = new Intl.NumberFormat("en", { style: "unit", unit: "foot-and-inch" }); fi.format("56"); // General GetIterator: "5 feet, 6 inches" (iterates chars!) // Object + GetIterator: TypeError
ToSequenceUnitList
1. If value is not an Object, throw a TypeError exception. 2. Let sequence be StringSplitToList(unit, "-and-"). 3. Let iteratorRecord be ? GetIterator(value, ~sync~). 4. Let iterableValues be ? IteratorToList(iteratorRecord). 5. If length of iterableValues ≠ length of sequence, throw RangeError. 6. Convert each via ? ToIntlMathematicalValue (undefined → TypeError), requiring matching signs & integer non-last values (→ RangeError).
Array
Set
IteratorToList
IteratorClose