var start=+new Date(); for(var i=0;i<=1000;i++){ console.log(i); } var end=+new Date(); console.log("for循环用时:"+(end-start));