第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

apply第二個參數(shù)不是應(yīng)該是個數(shù)組嗎?對象也行嗎?

apply第二個參數(shù)不是應(yīng)該是個數(shù)組嗎?對象也行嗎?

MMTTMM 2018-10-19 14:11:48
如圖
查看完整描述

1 回答

?
慕無忌1623718

TA貢獻(xiàn)1744條經(jīng)驗 獲得超4個贊

Syntax
fun.apply(thisArg, [argsArray])

Parameters

  • thisArg

The value of this provided for the call to fun. Note that this may not be the actual value seen by the method: if the method is a function in non-strict mode code, null and undefined will be replaced with the global object, and primitive values will be boxed.

  • argsArray

An array-like object, specifying the arguments with which fun should be called, or null or undefined if no arguments should be provided to the function. Starting with ECMAScript 5 these arguments can be a generic array-like object instead of an array. See below for browser compatibility information.

從es5開始支持array-like的object啦,所有array-like就是有l(wèi)ength屬性,有index作為key的object啦。
你這個object正巧就有l(wèi)ength屬性,不過沒有鍵值對,所以遍歷出5個undefined


查看完整回答
反對 回復(fù) 2018-11-15
  • 1 回答
  • 0 關(guān)注
  • 761 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號