上代码:
if ( some_variable == null ){
// some_variable is either null or undefined
}
更多代码:
if ( !some_variable ) {
// some_variable is either null, undefined, 0, NaN, false, or an empty string
}
上代码:
if ( some_variable == null ){
// some_variable is either null or undefined
}
更多代码:
if ( !some_variable ) {
// some_variable is either null, undefined, 0, NaN, false, or an empty string
}