1 2 3 4 5 6 7 8 9
var obj = {attr: 'value'}; (function() { var name = 'attr'; for (var i = 0; i < 10; ++i) assertEq(obj[name], 'value'); })(); /* Look up a string id. */