title: Javascript syntax specification for methods parameters on Mozilla developer network
body: <p>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="nofollow noreferrer">MDN Web Documentation</a> describes the syntax for use in JavaScript standard built in objects methods, using brackets to group the available parameters. </p>
  
  <p>For example:</p>
  
  <pre><code>var new_array = arr.map(function callback(currentValue[, index[, array]]) {
  // Return element for new_array
  }[, thisArg])
  </code></pre>
  
  <p>This has been causing some confusion for me while reading the documentation and I can not understand the purpose of grouping the parameters with brackets.</p>
  
  <p>For instance, in the example above, why are the index and array parameters grouped as so.</p>
  
  <pre><code>callback(currentValue[, index[, array]])
  </code></pre>
  
  <p>Many thanks for your time and help.</p>