I'm new to JavaScript, hope that someone can point me in the right direction.
var foo = 10;
var bar = "foo"; // I want bar to be a pointer to the contents of foo
alert(bar); // Naturally, the alert shows 'foo'
How can I setup a pointer to variable foo to let bar show 10 instead of 'foo'