Answer the question
In order to leave comments, you need to log in
How to read such syntax correctly?
Where can I read the rules for composing and correctly reading such syntax?
Answer the question
In order to leave comments, you need to log in
In my opinion, this is a generally accepted syntax, I won’t tell you where to look, but optional arguments to functions are always indicated in square brackets.
There are other similar options:
arr.map(Function callback[, Object context = null])
//
функция(Тип имя[, Тип имя = значение_по_умолчанию])
Decent documentation should describe this syntax at the beginning. (If it was written by a person familiar with mathematics.)
what is not clear? there is an instance of the array class - arr, which has a sort method that accepts a sort method, chosen either from the available ones (read in the documentation), or from self-written
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question