javascript cast bool to int

JavaScript
+ true; // 1
+ false; // 0fooBar | 0
Source

Also in JavaScript: