📜  javascript 条件评估 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:56             🧑  作者: Mango

代码示例1
if ( expression )
Here are some expressions and their result
    Undefined: false
    Null: false
    Boolean: the result equals the input argument (no conversion)
    Number: false if the argument is +0, -0, or NaN; otherwise true
    String: false if the argument is an empty string (length = 0); 
            otherwise true
    Object: true