title: Does map function store the return values in temporary variable
body: <p>In first example I explicitly assign the return result to a variable and return the result,</p>
  
  <p>In second example I just return the result from map function and map does not modify the iterator.</p>
  
  <p>Then how it return the result since the result is array and it only prints once to the console after the execution completes. Does it creates any temporary variable in memory and how it managed?</p>
  
  <p><strong>Example1:</strong>
  <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>var usr = {
    usrName: 'Bob',
    hobbies: ['TV', 'Radio', 'Letters'],
    getLikes: function () {
      var that = this;
      var interests = this.hobbies.map(function(item){
        return that.usrName + ' likes ' + item;
      });
      return interests;
    }
  };
  console.log(usr.getLikes());</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Example2:</strong>
  <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>var usr2 = {
    usrName: 'Bob',
    hobbies: ['TV', 'Radio', 'Letters'],
    getLikes: function () {
      var that = this;
      debugger;
      return this.hobbies.map(function(item){
        return that.usrName + ' likes ' + item;
      });
    }
  };
  console.log(usr2.getLikes());</code></pre>
  </div>
  </div>
  </p>