文章詳情頁
javascript - 關(guān)于一些文檔語法表示‘[,’
瀏覽:110日期:2023-09-10 10:21:42
問題描述
1.經(jīng)??次臋n會看到一些示例語法但是看不懂語法里參數(shù)表示形式,都用參數(shù)用 ‘[,’隔開是什么意思,如下圖:
問題解答
回答1:[ ]里面的是可選參數(shù),可以提供,也可以不提供。寫的格式是這樣的,首先 arg1,arg2, 然后arg2為可選參數(shù),就在參數(shù)arg2上加方括號。即,arg1[,arg2]
回答2:可選參數(shù)
array.forEach(callback) 或者 array.forEach(callback, thisArg)
回答3:可選參數(shù),就是可填可不填
標簽:
JavaScript
相關(guān)文章:
1. VUE引入jquery以后,調(diào)用方法,提示’$’ is not defined。2. python - 為什么match匹配出來的結(jié)果是<_sre.SRE_Match object; span=(0, 54), match=’’>3. linux - python ImportError: No module named ’***’4. node.js - Cannot find module ’webpack/bin/config-yargs’5. 網(wǎng)頁爬蟲 - python3.4.1 request模塊報錯 ’list’ object has no attribute ’get’6. dict - Python中dic寫入txt報錯:a bytes-like object is required, not ’str’7. javascript - $(document).scrollTop()與某個div的$(’#js_productWrap’).offset().top8. mysql里concat函數(shù)和 ‘’|‘’ 符號一起用是表示什么?9. $_GET[’page’] 是哪兒來的?10. python - flask去掉return redirect(url_for(’index’)),結(jié)果沒有變化
排行榜

熱門標簽