How to toggle a boolean?

bool = !bool;

This holds true in most languages.

Leave a Comment