title: In Javascript, why is the minimum of an empty spread array Infinity?
body: <p>I'm using a generator to create objects, like so:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function* Thing() {
    var x = 0;
    while (x &lt; 3) {
      var rules = [{arr: [1, 2, 3]}, {arr: [1]}, {arr: []}];
      yield {
        arrayMinimum: Math.min(...rules[x].arr)
      }
      x++
    }
  }
  
  var create = Thing();
  
  console.log(create.next().value)
  console.log(create.next().value)
  console.log(create.next().value) // { arrayMinimum: Infinity } ???</code></pre>
  </div>
  </div>
  </p>
  
  <p>Why is <code>Math.min(...[]) === Infinity</code>? </p>
  
  <p>Bonus confusion: <code>Math.max(...[]) === -Infinity</code> ???</p>