title: Second argument in JSON.stringify in JavaScript
body: <p>In JavaScript's <code>JSON.stringify()</code> function, I occasionally see the following syntax:</p>
  
  <pre><code>JSON.stringify(obj, null, 4)
  </code></pre>
  
  <p>However, I can't get what the second argument, <code>null</code>, is supposed to do. As long as I know, the above function takes an object as its first argument, and converts it to a string variable. The third argument, <code>4</code> in this case, indents and pretty-prints the resultant string object. But I can't see what the second argument tries to do even after I read the explanation on the official document... So what does the argument do? Or is it just there in order to take in the third argument? (But I think then the function should take both argument name and its parameter, such that for example, <code>JSON.stringify(obj, space=4)</code>. I'm not sure whether that sort of syntax is allowed in JavaScript, so forgive me if it's not. But I don't know my expectation is correct in the first place, so would like to throw a question anyway).</p>
  
  <p>Thanks.</p>