In an answer for how to declare 2D JavaScript arrays, Declare an empty two-dimensional array in Javascript? Kamil Kiełczewski utilized the method JSON.stringify.replace() to format the array output and passed an expression (regular expression?) that I did not understand. I checked the spec at https://tc39.es/ecma262/#sec-json.stringify which does not mention a .replace() method. I am trying to locate the documentation for the .replace() method and would like to understand the expressions that the JSON.stringify.replace() method expects.
The only other reference besides Kamil's was in a description to safely convert JSON strings into JavaScript https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify