title: what is the difference and what is better to use: Factory Function vs Constructor Function. Please reason your approach, so I can learn
body: <p>I have two functions that do the same thing (I may be wrong, but seems like they do the same thing in my newbie opinion):</p>
  <pre><code>// Factory Function
  function createCircle(radius) {
      return {
          radius,
          draw: function() {
              console.log('draw');
          }
      }
  }
  const newCircle = createCircle(2);
  console.log(newCircle);
  </code></pre>
  <p>And</p>
  <pre><code>// Constructor Function
  function Circle(radius) {
      this.radius = radius;
      this.draw = function() {
          console.log('draw')
      }
  }
  const another = new Circle(2);
  console.log(another);
  </code></pre>
  <p>Are there some pros and cons of these approaches? Just seeking for the opinions of more experienced developers.</p>