정말 기가 막히는 구나 ㅋㅋ;
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
int main(int c, char **v)
{
while(--c > 1 && !fork());
sleep(c = atoi(v[c]));
printf("%d\n", c);
wait(0);
return 0;
}
실행화면

같은 코드를 JS 코드로 하면..
(function(arr){
for(var i=0; i<arr.length; i++){
var n=arr[i];
setTimeout((function(n){
return function(){
console.log(n);
}
})(n), n);
}
})([10, 1, 4, 2, 6, 3, 8, 5]);