How to read function expression syntax in javascript?

Viewed 39
1 Answers

Square brackets represent optional

So it means, that [name] is optional, function declared without name become an anonymous function. [param1[, param2[,... this means that the parameters are optional, however because they are shown inside previous parameter (all closing ] brackets are at the end of the list) means that you can't have param2, without param1, or param3 without param2 and param1 and so on.

Related