JS and undefined undefined

Js if the object is then judged whether equal undefined undefined being given,

need to use

if(typeof(username)=='undefined')

If you define too, and can be used directly

if(username==undefined)

Note that the other determined

if(null==undefined)  true

if(null===undefined) false

if(typeof null=="object") true

Guess you like

Origin www.cnblogs.com/zhaogaojian/p/12160912.html
Recommended