Are new instances created when calling the same function, or are they the same? That is, for example, if in this code g () is executed after the second call of f (), will the new call affect the variable "a", how does g () see it?
function f(value) { var a = value; somePromise().then(() => { ... g(); }); } f(1); f(5);