Declare classes using 'class' or 'function' : <p>Right now, I know 2 different ways to declare a class. </p>

<p>Using <code>function</code>: </p>

<pre><code>function test (constructor) {
  this.value = value;
}
test.prototype.method () {  
}
</code></pre>

<p>Using <code>class</code>:</p>

<pre><code>class test {
  constructor(parameters) {
    this.value = value;
  }
  method () { 
  }
}
</code></pre>

<p>What is the difference (if any) between the two, and which should I use when?</p>
