How to read jQuery documentation

I am very stupid to ask about this, and I am sure that the answer is quite obvious, but I just can not understand it myself.

Take this line of code (can I call it a "line of code"? I know it as a "plan", but what is it called?) From the jQuery documentation:

jQuery.get( url [, data ] [, success(data, textStatus, jqXHR) ] [, dataType ] )

How to read it? Why are commas placed after opening brackets? What does it mean?

+4
source share
2 answers

It should be read as a function call with urlas a required argument, and all other arguments are optional.

, , . , , .

success(data, textStatus, jqXHR). , , , .

+4

, "", , Backus-Naur Form (BNF). , .

, (, , , ). , , [ ] 0..1 . , , , / .

+2

Source: https://habr.com/ru/post/1537949/


All Articles