mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 08:35:07 +08:00
- Support published three.js rotations, bounds, ray intersections, culling, and vertex attributes on native and WASM targets without a JavaScript engine. - Preserve JavaScript class defaults, data descriptors, and captured loop bindings in static code. - Handle typed-array input unions and constructor identities while keeping unsupported method overrides explicit.
10 lines
431 B
JavaScript
10 lines
431 B
JavaScript
const table = ['a', 'b'];
|
|
function pair(i = 0, j = 0) { return table[i] + table[j]; }
|
|
function chain(i = 0, j = 0, k = 0) { return table[i] + table[j] + table[k]; }
|
|
console.log(pair(0, 1), pair(0, 4), pair(4, 0), pair(4, 5));
|
|
console.log(chain(0, 1, 0), chain(4, 5, 0), chain(4, 5, 6));
|
|
console.log(chain(0, 4, 1));
|
|
let calls = 0;
|
|
function take(i = 0) { calls++; return table[i]; }
|
|
console.log(take(4) + take(5) + take(0), calls);
|