title: Angular.copy function
body: <p>I noticed the following code recently in an Angular tutorial...</p>
  
  <pre><code>&lt;div ng-app="myApp" ng-controller="formCtrl"&gt;
    &lt;form novalidate&gt;
      First Name:&lt;br&gt;
      &lt;input type="text" ng-model="user.firstName"&gt;&lt;br&gt;
      Last Name:&lt;br&gt;
      &lt;input type="text" ng-model="user.lastName"&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;button ng-click="reset()"&gt;RESET&lt;/button&gt;
    &lt;/form&gt;
    &lt;p&gt;form = {{user}}&lt;/p&gt;
    &lt;p&gt;master = {{master}}&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  var app = angular.module('myApp', []);
  app.controller('formCtrl', function($scope) {
      $scope.master = {firstName: "John", lastName: "Doe"};
      $scope.reset = function() {
          $scope.user = angular.copy($scope.master);
      };
      $scope.reset();
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>With respect to the line: <code>$scope.user = angular.copy($scope.master);</code>, could this not have been simplified to: <code>$scope.user = $scope.master;</code> seeing that <code>$scope.master</code> is going to be an immutable constant in this case?</p>