Question: So I have this script that is a counter that follows an infinite animation. The counter resets to 0 everytime an interation finishes. On the line fourth from the bottom I am trying to invoke a x.classList.toggle() to change css when the counter hits 20. When I replace the classList.toggle with an alert() function it works, but as is no class 'doton' is added to 'dot1'. What am I missing?

<http://jsfiddle.net/8TVn5/>

```
window.onload = function () {

var currentPercent = 0;

var showPercent = window.setInterval(function() {

    $('#dot1').on('animationiteration webkitAnimationIteration oanimationiteration     MSAnimationIteration', function (e) {
  currentPercent= 0;}); 

   if (currentPercent < 100) {
   currentPercent += 1;
  } else {
    currentPercent = 0;
 }

   if (currentPercent == 20){document.getElementByID('dot1').classList.toggle('doton');}
    document.getElementById('result').innerHTML = currentPercent;
}, 200);

};

```

Answer: 
You can't modify a tuple. You'll either need to replace the tuple with a new one containing the additional vertex, or change it to a list. A list is simply a modifiable tuple.

```
vertices = [[0,0],[0,0],[0,0]]

for ...:
    vertices.append([x, y])

```
Not sure I understand you, but if you want to append x,y to each vertex you can do something like :

```
vertices = ([0,0],[0,0],[0,0])

for v in vertices:
    v[0] += x
    v[1] += y

```