Why arguments in all JavaScript Documentation are written like this? -


json.stringify(value[, replacer[, space]]) 

all on mdn, documentation represents arguments value[, replacer[, space]]. reason behind it?

what purpose of square brackets?

square brackets used lot of programming environments, command line tools , documentation show arguments optional.

the double brackets mean supplying 1 of optional arguments doesn't force provide value others.

that means replacer optional, , if provide it, space optional again, , can't specify space without specifying replacer.

this opposed to: (sample)

json.stringify(value[, replacer, space]) 

where need provide value space if provide value replacer.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -