判断值是否为undefined

用 typeof判断


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

原文地址:https://www.cnblogs.com/ybixian/p/9577619.html