2 ms·
> I always consider `if x:` a bug, unless x can only be a boolean. Oh, like this? ;) var eventA = new Date(), eventB = new Date(); if (!parseInt((event
by rmrfrmrf 12y ago
> I always consider `if x:` a bug, unless x can only be a boolean.
Oh, like this? ;)
var eventA = new Date(), eventB = new Date();
if (!parseInt((eventA - eventB) / 1000)) {
console.log("these events occurred simultaneously");
} else {
// troll harder with confusing use of 'asynchronous'
console.log("these events occurred asynchronously");
}