This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function log(n) { console.log(n); } | |
setTimeout(function A() { | |
setTimeout(function B() { | |
log(1); | |
setTimeout(function D() { log(2); }, 0); | |
setTimeout(function E() { log(3); }, 0); | |
}, 0); | |
setTimeout(function C() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Given a list of random comments, having dates and parentIds, this code | |
* sorts the list following parent-child relationships and dates. | |
* | |
* Notation: | |
* C1R2 stands for 'Second reply to first comment' | |
* C2R2R1R1 stands for '1st Reply to the 1st Reply to the | |
* 2nd Reply of the 2nd Comment' | |
* | |
* Input: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var testObject = { | |
id : 5, | |
name : 'foo' | |
} | |
function censor(censor) { | |
return (function() { | |
var i = 0; | |
return function(key, value) { |
NewerOlder