var data = { a: 'foo', b: {c: 'd'}, arr: [1, 2, 3] }; function fn() { var a = data.a, b = data.b; return a; } assertEqual(fn(), 'foo'); test(fn);