Please fix bug with a loop and closures. And finally add a line that actually calls testList(); function buildList(list) { var result = []; for (var i = 0; i < list.length; i++) { var item = \'item\' + list[i]; result.push( function() {alert(item + \' \' + list[i])} ); } return result; } function testList() { var fnlist = buildList([1,2,3]); // using j only to help prevent confusion - could use i for (var j = 0; j < fnlist.length; j++) { fnlist[j](); } } Solution function buildList(list) { var result = []; for (var i = 0; i < list.length; i++) { var item = \'item\' + list[i]; result.push( function() {alert(item + \' \' + list[i])} ); } return result; } function testList() { var fnlist = buildList([1,2,3]); // using j only to help prevent confusion - could use i for (var j = 0; j < fnlist.length; j++) { fnlist[j](); } } .