this question has answer here:
- what !! (not not) operator in javascript? 31 answers
i'm studying todomvc source , came across helper:
// addeventlistener wrapper: window.$on = function (target, type, callback, usecapture) { target.addeventlistener(type, callback, !!usecapture); };
what's !!usecapture
?
the double exclamation mark forces truthy/falsey value boolean. think of !(!usecapture)
, or not (not use capture).
Comments
Post a Comment