title: In $.extend(true, {}, obj) in javascript, what is the purpose of 'true'?
body: <p>When comparing the two constructors:</p>
  
  <pre><code>  function C(options, id) {
      this.id = id;
  
      // Extend defaults with provided options
      this.options = $.extend(true, {}, {
        greeting: 'Hello world!',
        image: null
      }, options);
  
  
    };
  </code></pre>
  
  <p>and </p>
  
  <pre><code>  function C(params, id) {
      this.$ = $(this);
      this.id = id;
  
      // Extend defaults with provided options
      this.params = $.extend({}, {
        taskDescription: '',
        solutionLabel: 'Click to see the answer.',
        solutionImage: null,
        solutionText: ''
      }, params);
    }
  </code></pre>
  
  <p>Is the <code>true</code> variable necessary after <code>$.extends</code>?</p>
  
  <p>Secondly, is the statement <code>this.$ = $(this)</code> necessary as the first constructor does not have it and they do the same thing.</p>