变量未定义

变量未定义时,

其被赋为undefined

let aaa;

console.log("undefined ...",undefined);

console.log("aaa ...", aaa);

if(aaa==undefined){
    console.log("aaa == undefined" );
}

if(aaa===undefined){
    console.log("aaa === undefined")
}

 

posted on 2021-07-21 11:25  zhishiyv  阅读(107)  评论(0编辑  收藏  举报

导航