In JavaScript when we define a new variable like this var a = true; in the global scope this variable becomes a global object property like window in the browser so we can reach it by window.a;, same for any object or array properties myObj.property; and myArr[0]; for example.
Even the function itself as an object we can define a properties inside the function object function foo(){}; foo.prop = value;.
But when we declare a variable inside a function using var or let like in this case
function foo(){
var v = 123;
}
This v variable is a property of what ? i thought it might be defined as non enumerable property inside of the function object it self or the constructor but when i use Object.getOwnPropertyNames() i can't find them, So where these variables supposed to be properties ? or they are not supposed to be and they are just variables in the memory without being properties for any object ?