title: array.splice is not a function - angular
body: <p>I am trying to delete an element /the last element from an array in angular. This is what <code>a</code> looks like</p>
  <pre><code>0: {geometry: {…}, symbol: {…}, attributes: {…}, infoTemplate: null, _suspended: false, …}
  1: {geometry: {…}, symbol: {…}, attributes: null, infoTemplate: null}
  2: {geometry: {…}, symbol: {…}, attributes: null, infoTemplate: null}
  </code></pre>
  <p>this is my function</p>
  <pre><code>_pushAddOperation: function (a) {
              console.log(&quot;a&quot;,a);
              m.forEach(
                  a,
                  d.hitch(this, function (a) {
                      var b = a.attributes || {};
                      b[this._objectIdName] = this._objectIdCounter++;
                      a.setAttributes(b);
                      this._graphicsLayer.add(a);
                      if (b  === x) {
                          //deletion
                          a.splice(-1,1);
                      }
                  })
              );
          }
  </code></pre>
  <p>I am getting an error saying a.splice is not a function and I don't understand why</p>
  <pre><code>_pushAddOperation: function (a) {
              console.log(&quot;a&quot;,a);
              m.forEach(
                  a,
                  d.hitch(this, function (k) {
                      var b = a.attributes || {};
                      b[this._objectIdName] = this._objectIdCounter++;
                      k.setAttributes(b);
                      this._graphicsLayer.add(k);
                      if (b  === x) {
                          //deletion
                          k.splice(-1,1);
                      }
                  })
              );
          }
  </code></pre>