'How does V8 handle scopes when WebAPI is used [duplicate]
I know JavaScript is single threaded non blocking, and hands things such as setTimeout() to the web api, but how does it handle scopes?
lets say there is a function like
function example()
{
const x = 10
setTimeout(() => { console.log(x) }), 100)
}
example()
How does it keep track of the variables in that scope? or do they not get deleted?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
