What do the brackets around the arguments mean when reading documentation for a method? [duplicate]
required
[optional]
<required>
[<optional>, <but both needed>]
.
This is almost always the case.
The brackets around a parameter means that it is optional.
When written separately like that, it means that you can use any of the parameters in any combination. The method determines what you use from the data type of the values. All these combinations can be used for that method:
.animate(properties, duration, easing, complete)
.animate(properties, duration, easing)
.animate(properties, duration, complete)
.animate(properties, duration)
.animate(properties, easing, complete)
.animate(properties, easing)
.animate(properties, complete)
.animate(properties)
You can see brackets used in other ways than around each parameters. For example:
.method(p1 [, p2 [, p3]])
This means that the second and third parameters are optional, and the third parameter can only be used if the second parameter is there.