Show HN: Virtual pet game made for my daughter
I've never seen this pattern before in JS, in the parameters for the constructor. playing with it in the browser, I can see it lets you define default values for expected arguments when calling it but you can provide other values.<p>What is this called? I'd like to read more about it.<p><pre><code>  class Resource{
    constructor({
      min = 0,
      max = 1,
      count = 0
    }={}){
      this.min = min;
      this.max = max;
      this.count = count;
    }
  }</code></pre>