Create a variable and execute code inside a Sandbox
<p>How do I manage it to place variables and run code inside Sandbox() through Run()? </p>

<pre><code>function Sandbox() {
    this.test = 'insandbox';
}

Sandbox.prototype.Run = function(src) {
    eval.call(this, src);
};

Sandbox.prototype.getvar = function(name) {
    return this[name];
};

var bx = new Sandbox();
bx.Run('var x = 1;');
print(bx.getvar('test'))
print(bx.getvar('x'))        // undefined
print(x)
</code></pre>

<p>Please no answers regarding eval() is insecure and I shouldn't use it.
Please no answers regarding the use of setters/getters.</p>

<p>Thanks for reading!</p>
