myAnswer = !! myVariable;
Actually, it is two operators right next to each other. Think of it as …
myAnswer = ! ( ! myVariable)
Now you can see that it is two negation operators (or “not” operators). The negation operator returns a boolean. The first negation operator converts myVariable to boolean. But then you need the second negation operator to reverse the first negation.
So effectively, the double exclamation converts objects into boolean.