Comma in front of square bracket - MDN docs

前端 未结 3 1249
耶瑟儿~
耶瑟儿~ 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:43

    The square brackets mean that the enclosed parameter is optional.

    Refer MDN syntax section for more info.

提交回复
热议问题