I got the task to make a table that was clickable and when you clicked on a certain row it turns green. i figured that out but now i have to make it that when a row goes green the counter goes up, and when its unclicked it needs to go down again.
someone please help :P

```
 <style>
.green-cell {
   background: rgb(29, 247, 0); 
}
</style>

<body>

<div class="container">
  <h2>Basic Table</h2>
  <p>The .table class adds basic styling (light padding and only horizontal dividers) to a table: <button id="clickme"> 0</button> </p>            
  <table class="table " id="onclick" >
    <thead>
      <tr >
        <th>Firstname</th>
        <th>Lastname</th>
        <th>Count</th>
      </tr>
    </thead>
    <tbody>
        <td >John</td>
        <td>Doe</td>
        <td>1</td>
      </tr>
        <td>Mary</td>
        <td>Moe</td>
        <td>2</td>
      </tr>
      <tr>
        <td>July</td>
        <td>Dooley</td>
        <td>3</td>
      </tr>
    </tbody>
  </table>

  <script>
      $( function() {
    $('tr').click( function() {
    $(this).toggleClass("green-cell");

    count += 1;
    button.innerHTML =   count;

    } );
    } );

    var button = document.getElementById("clickme"),
     count = 0;
    button.onclick = function() {
    count += 1;
    button.innerHTML =   count;
};

    </script>

```