js五种空值的类型和判断为false的类型

js五种空值的类型:

typeof(undefined) == 'undefined'

typeof(null) == 'object'

typeof("") == 'String'

typeof(0) == 'number'

typeof(false) == 'boolean'

========================================================

false类型:

false=>false,undefined=>false,null=>false,""=>false,0=>false

你可能感兴趣的:(js五种空值的类型和判断为false的类型)