function assert(value, text) {
if(value === true) {
console.log(text)
} else {
console.log('error')
}
}
// assert(typeof fun === "function", "fun is a function even though its definition isn'n reached yet")
// assert(typeof myFunExp === "undefined","but we can not access function expression")
// function fun() {
// }
// var myFunExp = () => {}
// 函数重载
assert(typeof fun === "function", "we access the function")
var fun = 3
assert(typeof fun === "number", "now we access the number")
function fun() {
}
assert(typeof fun === "number","still a number")
console