我一直在尝试做一个实验,看看函数中的局部变量是否存储在堆栈中。所以我写了一点性能测试functiontest(fn,times){vari=times;vart=Date.now()while(i--){fn()}returnDate.now()-t;}enefunctionstraight(){vara=1varb=2varc=3vard=4vare=5a=a*5b=Math.pow(b,10)c=Math.pow(c,11)d=Math.pow(d,12)e=Math.pow(e,25)}functioninversed(){vara=1varb=2varc=3vard=4vare