I have the following piece of code:
var blah = function(x, y){
var e = {
ox: x,
oy: y,
etc.
}
return e;
};
However, I am getting an error “x is undefined”. I thought that x and y should be available in inner scopes. Any help/explanation would be greatly appreciated!
Works fine for me. Did you use
newand did you pass 2 params?