Page MenuHomePhorge

test_closure2.js
No OneTemporary

Size
151 B
Referenced Files
None
Subscribers
None

test_closure2.js

const funcs = [];
for (let i = 0; i < 3; i++) {
const captured = i;
funcs.push(() => captured);
}
console.log(funcs[0](), funcs[1](), funcs[2]());

File Metadata

Mime Type
text/plain
Expires
Sun, May 3, 7:58 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
518300
Default Alt Text
test_closure2.js (151 B)

Event Timeline