Interesting behavior between javascript and node.js

2 views
Skip to first unread message

Lei

unread,
Apr 5, 2013, 4:45:01 PM4/5/13
to programmin...@googlegroups.com
try to execute following code, first in pure javascript (chrome browser), second in node.js
<script>
setTimeout(function() {
 console.log('first callback!');
 }, 5000);
 setTimeout(function() {
 console.log('second callback!');
 }, 1000);
 console.log('Hello');
</script>

Reply all
Reply to author
Forward
0 new messages