functionfoo(){ fun() bar() console.log("this is foo") var subfoo = function(){ console.log("this is subfoo") (function(){ console.log("this is inside of subfoo") })() } subfoo() }
functionfun(){ console.log("this is fun") var subfun = function(){ console.log("this is subfun") } subfun() } functionbar(){ console.log("this is bar") var subbar = function(){ console.log("this is subbar") } subbar() }
functionnext(){ console.log("NEXT HAS BEEN CALLED") }