// for文使った関数定義で質問です
var obj = {};
var arr = [ 'left', 'top', 'width' ], a;
for( var i = 0 ; i < arr.length ; i++ )
obj[ ( a = arr[i] ) + '_test' ] = function() { console.log( a ); };

obj.left_test(); // 表示:width
obj.top_test(); // 表示:width
obj.width_test(); // 表示:width
// このようにconsole.log( a );の部分がfor文の最後の要素になってしまうのです
// obj.left_test();で'left',
// obj.top_test();で'top'が返るようにしたいのですがやり方を教えてください