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
Post a Comment