JSFiddle - React, Tailwind, and code Playground
by seong gyun jeon
JavaScript
(function(){
console.log('javascript block start=' + new Date().getSeconds());
for (var i = 0; i < 100000; i++){
if (i === (100000 - 1)){
console.log('javascript block end=' + new Date().getSeconds());
break;
}
console.log();
}
this.setTimeout(function(){
console.log('javascript onload event before' + new Date().getSeconds());
}, 1);
this.onload = function(){
console.log('javascript onload start=' + new Date().getSeconds());
var args = arguments;
var a = 0;
var b = 0;
var c = 0;
var d = 0;
args.callee.timer1 = setTimeout(function(){
if (a < 1000){
if (a === 0) console.log('timeout block queue1 start=' + new Date().getSeconds());
a++;
args.callee.timer1 = setTimeout(arguments.callee, 10);
}
else{
clearTimeout(args.callee.timer1);
console.log('timeout block queue1 end=' + new Date().getSeconds());
}
}, 10);
args.callee.timer2 = setTimeout(function(){
if (b < 1000){
if (b === 0) console.log('timeout block queue2 start=' + new Date().getSeconds());
b++;
args.callee.timer2 = setTimeout(arguments.callee, 10);
}
else{
clearTimeout(args.callee.timer2);
console.log('timeout block queue2 end=' + new Date().getSeconds());
}
}, 10);
args.callee.timer3 = this.setInterval(function(){
if (c < 1000){
if (c === 0) console.log('interval block queue1 start=' + new Date().getSeconds());
c++;
}
else{
...