Files
scriptc/tests/corpus/2754-array-property-undefined.ts
Chris Tate 94fd361b54 Implement sparse native arrays and missing-value parity (#297)
Represent ordinary JavaScript arrays with hole, value, and explicit-undefined states; add sparse side storage and carry missing values through the frontend, native backends, runtime, and Node-facing consumers.
2026-09-12 22:39:07 -05:00

8 lines
305 B
TypeScript

// Noncanonical numeric keys are ordinary properties and can carry present undefined.
const values: number[] = [7];
const missing = values[9];
values[-1] = missing;
values[0.5] = missing;
values[4294967295] = missing;
console.log("properties", values.length, values[-1], values[0.5], values[4294967295]);