title: how to concat in angularjs variable name with scope?
body: <p>i have this code:</p>
  
  <pre><code>angular.module('ExampleApp', ['ngDraggable']).
        controller('MainCtrl', function ($scope) {
          $scope.centerAnchor = true;
          $scope.toggleCenterAnchor = function () {$scope.centerAnchor = !$scope.centerAnchor}
          $scope.draggableObjects = [{name:'subject1'}, {name:'subject2'}, {name:'subject3'}];
          $scope.droppedObjects1 = [];
          $scope.droppedObjects2 = [];
          $scope.onDropComplete1=function(data,evt,i){
              var index = $scope.droppedObjects1.indexOf(data);
              if (index == -1)
              $scope.droppedObjects1.push(data);
          }
          $scope.onDragSuccess1=function(data,evt){
              console.log("133","$scope","onDragSuccess1", "", evt);
              var index = $scope.droppedObjects1.indexOf(data);
              if (index &gt; -1) {
                  $scope.droppedObjects1.splice(index, 1);
              }
          }
          var inArray = function(array, obj) {
              var index = array.indexOf(obj);
          }
        });
  </code></pre>
  
  <p>and variable "i" pass in function call and i want to do like this <code>var index = $scope.droppedObjects+i.indexOf(data);</code> how this is possible?</p>