If this should be a comment, let me know.
In this particular instance, it's saying that you can pass in any number of middleware functions, separated by commas, *AND/OR* one single callback to be run as the last part of the method.
The square brackets sort of represent an "array" (though not really an array) of however many middleware functions you want to run before the final function call for the method.
The space
after the square brackets is sort of an *AND/OR* character saying that you can pass however many middleware functions, AND a final function, OR just the final function without the middleware functions.
They're not declaring a function here, in the documentation. They're showing you "this is how many functions you can pass as middleware for this method which has been defined elsewhere: as many as you want, AND THEN the final function, or zero, AND THEN the final function"
Clear as mud?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…