set boolean to true javascript code example Example: boolean bool x = true; if (x) { print ("Hello") }