Can I do something in Javascript that will automaticaly transform this:
var x = 0;
into the following (but only in memory-- I don't want to change the "view source"):
var x = {Value: 0};
For exemple:
var x = { Value: 0 };
function a(x) //This function doesn't work if the parameter is not an object, and it would be better if I didn't have to write { Value: 0 }
{
x.Value++;
}
a(x);
alert(x.Value);