you don't need to use !! to cast it to a Boolean, the whole point of ~array.indexOf it's falsy already and while work fine in the && bellow