Could you propose any workarounds to implement a reference to variable using closures or any other tricks?
createReference = function() { // TODO: how to
Since objects will always be a static reference, you can do this:
var o = {}; o.x = 5; var oRef = o; alert(oRef.x); // -> 5 o.x = 6; alert(oRef.x); // -> 6