MDN uses:
JSON.stringify(value[, replacer [, space]])
instead of just this:
JSON.stringify(value, replacer, space)
What do the square brackets mean?
Square brackets are used to index (access) elements in arrays and also Strings. Specifically lost[i] will evaluate to the ith item in the array named lost.
What do square brackets mean in JS? The [] operator converts the expression inside the square brackets to a string. For instance, if it is a numeric value, JavaScript converts it to a string and then uses that string as the property name, similar to the square bracket notation of objects to access their properties.
It's a conventional way in technical documentation of saying that part is optional.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With