The brackets around the parameter mean that this is optional.
When writing separately, this means that you can use any of the parameters in any combination. The method determines what you are using from the data type of the values. All of these combinations can be used for this 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 the brackets used in other ways than around each parameter. For instance:
.method(p1 [, p2 [, p3]])
This means that the second and third parameters are optional, and the third parameter can only be used if there is a second parameter.
source share