Comma in front of square bracket - MDN docs

前端 未结 3 1245
耶瑟儿~
耶瑟儿~ 2021-01-27 01:53

MDN is my primary Javascript resource. I often see a notation like ( currentValue[, index[, array]]) as in:

l         


        
3条回答
  •  再見小時候
    2021-01-27 02:40

    That means the callback requires a currentValue as the first argument, and index and array are optional arguments.

提交回复
热议问题