Referencia de JavaScript 1.5:Funciones globales:Boolean
De MDC
Tabla de contenidos |
[editar] Summary
Core Function
Converts the specified value to a boolean.
[editar] Syntax
Boolean(val)
[editar] Parameters
-
val - A value.
[editar] Description
Boolean is a top-level function and is not associated with any object. It is also a constructor for Boolean objects.
The Boolean method converts any value into a boolean. If val is null, undefined, false, -0, +0, NaN, or an empty string (""), Boolean returns false, otherwise it returns true for all other numbers, strings, and objects.