文章詳情頁
javascript - 關(guān)于一些文檔語法表示‘[,’
瀏覽:100日期:2023-09-10 10:21:42
問題描述
1.經(jīng)常看文檔會(huì)看到一些示例語法但是看不懂語法里參數(shù)表示形式,都用參數(shù)用 ‘[,’隔開是什么意思,如下圖:
問題解答
回答1:[ ]里面的是可選參數(shù),可以提供,也可以不提供。寫的格式是這樣的,首先 arg1,arg2, 然后arg2為可選參數(shù),就在參數(shù)arg2上加方括號(hào)。即,arg1[,arg2]
回答2:可選參數(shù)
array.forEach(callback) 或者 array.forEach(callback, thisArg)
回答3:可選參數(shù),就是可填可不填
標(biāo)簽:
JavaScript
相關(guān)文章:
1. php工具箱配置第二個(gè)vhost主機(jī)時(shí)不生效,報(bào)錯(cuò)You don’t have permission2. java - linux安裝idea出錯(cuò)JDK Required: ’tools.jar’ seems to be not in IDEA3. mysql日期類型默認(rèn)值’0000-00-00’ 報(bào)錯(cuò)4. python - flask去掉return redirect(url_for(’index’)),結(jié)果沒有變化5. python - Win7調(diào)用flup報(bào)錯(cuò)’module’ object has no attribute ’fromfd’6. 加了頭部設(shè)置:header(’Content-type:text/html;charset=uft-8’); 報(bào)錯(cuò)7. 編碼 - Python 3.6中 ’utf-8’ codec can’t decode byte invalid start byte?8. 對(duì)$register=<<<’FORM’不懂9. mysql - 數(shù)據(jù)導(dǎo)入報(bào)錯(cuò):Got a packet bigger than‘max_allowed_packet’bytes的問題10. python - AttributeError: ’tuple’ object has no attribute ’strip’錯(cuò)誤
排行榜

熱門標(biāo)簽