function ok(value, message) {
if (!!!value) fail(value, true, message, '==', assert.ok);
}
assert.ok = ok;
!!!value
basically means not not not Boolean(value)
yes?
Say if value = 9 > 1
, then it would mean: not not not true
.
not true = false
not not true = true
not not not true = false
My brain hurts. Why don't they just use !value
instead of !!!value
?
!! is Cast or Convert the variable to Boolean and the additional ! inverts it. I think you could do this if it's easier to read var invertedBool = !Boolean("false");
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments