Square brackets are used by many programming environments, command line tools, and documentation to indicate that arguments are optional.
Double brackets mean that providing one of the optional arguments does not force you to provide a value for the others.
This means that replacer is optional, and if you provide it, space is optional again, and that you cannot specify space without specifying replacer .
This contradicts: (sample)
JSON.stringify(value[, replacer, space])
If you need to specify a value for space , if you specified a value for replacer .
source share