課程
/前端開(kāi)發(fā)
/JavaScript
/JavaScript深入淺出
輸入?typeof?function(){}后?返回類型才為function
2015-04-10
源自:JavaScript深入淺出 1-5
正在回答
。。。。。。。。。。。。。。。。。。。。
function是函數(shù)聲明的關(guān)鍵字
你可以寫:
console.log(typeof?Function)??//function
function a(){}
typeof(a)
舉報(bào)
由淺入深學(xué)習(xí)JS語(yǔ)言特性,且解析JS常見(jiàn)誤區(qū),從入門到掌握
1 回答為什么typeof(function(){ }) 返回的是function
3 回答var func = new Function("console.log(typeof i);")
1 回答為什么要重新定義一個(gè)typeOf函數(shù),為什么不直接用內(nèi)置的typeof呢
2 回答為什么按照教程輸入bind會(huì)報(bào)錯(cuò)呢?
3 回答作用域鏈 var func = new Function("console.log(typeof i );");
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2015-04-10
。。。。。。。。。。。。。。。。。。。。
2019-10-11
function是函數(shù)聲明的關(guān)鍵字
你可以寫:
2015-04-21
function a(){}
typeof(a)