Q1: 請問以下會輸出什麼內容?
let x = y(function z() {
console.log('I am z')
})
function y(fn) {
fn()
console.log('I am y')
return fn
}
x()
console.log(y)
console.log(x)
console.log(x === y)
answerI am z
I am y
I am z
[Function: y]
[Function: z]
false
參考文章覺得 JavaScript function 很有趣的我是不是很奇怪