SOURCE

let n1 = 1
let n2 = 'aa'
let n3 = true
let n4 = {}
let n5 = []
let n6 = () => {}
let n7 = undefined
let n8 = null
let n9 = Symbol(111)
let n10 = NaN

const t = (p) => {
    console.log(typeof p)
}

/**
 * typeof 判断类型时
 * {} [] null ==> object
 * NaN ==> number
 * Symbol ==> symbol
 */
t(n1)
t(n2)
t(n3)
t(n4)
t(n5)
t(n6)
t(n7)
t(n8)
t(n9)
t(n10)


console 命令行工具 X clear

                    
>
console