判断值是否为undefined

用 typeof判断


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

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