javascript - Regarding some document syntax expressions '[,'
滿天的星座
滿天的星座 2017-05-24 11:38:27
0
3
867

1. I often see some sample syntax when reading documents, but I don’t understand the parameter representation in the syntax. What does it mean to use parameters separated by ‘[,’, as shown below:

滿天的星座
滿天的星座

reply all(3)
洪涛

[] contains optional parameters, which may or may not be provided.
The writing format is like this, first arg1, arg2, then arg2 is an optional parameter, just add square brackets to parameter arg2. That is, arg1[, arg2]

世界只因有你

Optional parameters

array.forEach(callback) 或者 array.forEach(callback, thisArg)

左手右手慢动作

Optional parameters, you can fill them in or not

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template