title: scope() function returning undefined in AngularJS controller
body: <p>I have a function inside controller:</p>
  
  <pre><code>$scope.passValues = function (param1){
      return "foo";
  };
  console.log($scope.passValues());
  </code></pre>
  
  <p>this will log <code>foo</code>, but:</p>
  
  <pre><code>$scope.passValues = function (param1){
      return param1;
  };
  console.log($scope.passValues());
  </code></pre>
  
  <p>this 
  I don't understand why because: </p>
  
  <pre><code>$scope.passValues = function (param1){
          console.log(param1);
          return param1;
       };
  </code></pre>
  
  <p>will log <code>robert</code>, which is coorect when used as <code>passValues(item.firstName)</code>.
  My problem is with second example, where I need the function to correctly return param1 value so it can be used later in controller.</p>