How would you alert() the contents of the bar variable using the foo variable?

by mrrodd

JavaScript

var foo = "bar";
var bar = "foobar";

alert( eval(foo) );