Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4504635
test_block_closure.cjs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
199 B
Referenced Files
None
Subscribers
None
test_block_closure.cjs
View Options
// Test closures in blocks
let result;
{
let x = 5;
{
let y = 10;
result = function() {
return x + y;
};
}
}
console.log(result()); // Should print 15
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 3, 9:55 AM (4 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
518303
Default Alt Text
test_block_closure.cjs (199 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment