Joined July 2012
·
Posted to
Be careful with setTimeout in loops
over 1 year
ago
for (var i = 1; i <= 5; ++i) {
(function(n) {
setTimeout(function(){
console.log(n);
}, 1000);
}(i));
}
Posted to
Protothreads; multitask on a single thread
over 1 year
ago
What happens if I change the time of the system clock at any moment between those steps?
Posted to
The single most useful thing in bash
over 1 year
ago
mind = blow
Achievements
59 Karma
3,199 Total ProTip Views
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Charity
Fork and commit to someone's open source project in need
@flipecoelho On the very last example, them both work the same, only that I use anonymous functions