If you convert the string values of true and false, they will both convert to the Boolean true value because both string values are nonzero values : Boolean « Data Type « Flash / Flex / ActionScript






If you convert the string values of true and false, they will both convert to the Boolean true value because both string values are nonzero values

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        trace(Boolean("true"));  // Displays: true
        trace(Boolean("false"));  // Displays: true
    }
  }
}

        








Related examples in the same category

1.Numeric value of 0 can be converted to a Boolean false, and any nonzero value will be converted to true