fork(1) download
  1. function FUNC1(){
  2. console.log("1")
  3. setTimeout(function(){console.log("2")},250)
  4. setTimeout(function(){console.log("3")},500)
  5. }
  6.  
  7.  
  8. function FUNC2(){
  9. console.log("4")
  10. setTimeout(function(){console.log("5")},350)
  11. setTimeout(function(){console.log("6")},600)
  12. }
  13.  
  14. queue = []
  15. queue.push(FUNC1)
  16. queue.push(FUNC2)
  17.  
  18. for (i=0;i<queue.length;i++){
  19. queue.shift(0)()
  20. }
Runtime error #stdin #stdout #stderr 0.43s 381824KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
js: uncaught JavaScript runtime exception: ReferenceError: "console" is not defined.