87,996
社区成员
发帖
与我相关
我的任务
分享var a=1, t1,t2,t=[];
for(var j=0;j<6;j++){
t1 = new Date().getTime()
for(var i=0;i<1e5;i++){
//a= a<<1;
a=a*2;
}
t2= new Date().getTime()
t.push(t2-t1);
}
console.log(t)
// 测试结果, 多试几次看看
// [110, 80, 75, 74, 80, 74]
