boolean.toString()



The boolean.toString() method returns "1" or "0" depending on the value of the boolean.

Example
var boolval = true;   return boolval.toString(); // returns "1"