js闭包怎么写var result=[]function foo(){ var i= 0 for (i<3i=i+1){ result[i]=function(){ alert(i) 2023-02-18JavaScript410