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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -