判断值是否为undefined

用 typeof判断


if(typeof value === 'undefined'){
    ...
}else {
 ...
}

posted @ 2018-09-03 11:33  山村码农  阅读(1141)  评论(0)    收藏  举报