读一下程序,判断输出结果,并分析原因
var apples = ["apple1", "apple2", "apple3"];for (var i = 0, funs = []; i < 3;i ++){ funs[i] = function(){ console.log(apples[i]); } } funs[0](); funs[1](); funs[2]();
慕侠2389804
相关分类