Javascript test ( object && object !== “null” && object !== “undefined” )

后端 未结 9 2020
闹比i
闹比i 2020-12-29 22:46

I seem to be using this test a lot

if( object && object !== \"null\" && object !== \"undefined\" ){
    doSomething();
}

on

9条回答
提交回复
热议问题