Files
Chris Tate c257368c5e Compile Effect generators statically (#589)
* Compile Effect generators statically

* test: declare the dormant array write's expected fence
2026-09-30 14:25:29 -05:00

17 lines
451 B
JavaScript

export function increment(value) {
console.log(value++, value, --value, value);
}
increment(3);
increment("7");
increment(2n);
increment(undefined);
increment({ valueOf() { return 9; } });
try { increment(Symbol("value")); } catch (error) { console.log(error.name, error.message); }
export const hash = str => {
let h = 5381, i = str.length;
while (i) h = h * 33 ^ str.charCodeAt(--i);
return h;
};
console.log(hash("hello"), hash("world"));