Version: v0.6.1 - Beta.  We welcome contributors & feedback.  THanks!

Boolean.toNumber

toNumber()

Description

Return 1 if true, or 0 if false.

print(true.toNumber());
//= 1

print(false.toNumber());
//= 0