Web host - B Boolean (Primitive value) Boolean (Primitive value)
B Boolean (Primitive value) Boolean (Primitive value) A built-in primitive value. Availability: Property/method value type: ECMAScript edition 2 Boolean primitive A Boolean value is a member of the Boolean type and may have one of two unique values, either trueor false. In some languages the values true and falsealso equate to numeric values. False is commonly 0 and trueany non-zero value. In JavaScript this is not the case. The value false does not test equal against zero. However, a false Boolean value does become zero when converted to a number. If you create a Boolean object and set it to the value true, you cannot convert it to a number with the toNumber()method, because this generates a run-time error. However, you can coerce the Boolean value into a numeric value by preceding it with a unary plus sign. So +true is a numeric primitive and yields the value 1, while falseis converted to zero. See also: false, JavaScript to Java values, true Cross-references: ECMA 262 edition 2 section 4.3.13 ECMA 262 edition 3 section 4.3.13 Wrox Instant JavaScript page 14 boolean (Reserved word) Reserved for future language enhancements. The boolean keyword represents both a Java data type and the native Boolean primitive data type in JavaScript. This suggests some potential extensions of JavaScript interfaces to access Java applet parameters and return values. See also: java.lang.Boolean, LiveConnect, Reserved word Cross-references: ECMA 262 edition 2 section 7.4.3 ECMA 262 edition 3 section 7.5.3