Version: v0.8.1 - Beta.  We welcome contributors & feedback.

Boolean.toNumber

toNumber()

Description

Return 1 if true, or 0 if false.

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

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