vargoal=[];varlocalGoal=[{a:'a',b:'b',c:'c'},{a:'e',b:'f',c:'g'},{a:'h',b:'i',c:'j'}];functionadd(){$.each(localGoal,function(index,val){vartemp={};temp.tempa=val.a;temp.tempb=val.b;temp.tempc=val.c;goal.push(temp);console.log(goal);});}varmain=function(){add();}main();Chrome的console里面的打印结果很奇怪。
添加回答
举报
0/150
提交
取消