let's say,
function f(){}
f();
When the function f() is defined a function object gets created in memory (along with it's prototype object)
Will the execution of the function further create any new objects? If yes, what it is ?
EDIT:
I am trying to understand the module pattern implemented in Javascript
function f(){
var name="";
out = {
getName: function(){return name;},
setName: function(newName){name = newName}
};
return out;};
var x= f();
var y = f();
Calling x.setName("foo"); does not affect the value of y.getName()
Where actually is the variable name stored for x and y if not in any object?
()next to a function/routine is the closing of a stream, after declaringfopened it.