I have seen in a codebase instances of the (simplified version) of the following code:
//testIds is a calculated array of ids stored in a variable
let existence = tests.filter( (test) => return !!~testIds.indexOf(test.id) )
I have no idea what !!~ is, to me it looks like it's a more verbose way of saying:
testIds.indexOf(test.id) > 0
Can someone tell me what this is?