title: Making a snippet more efficient
body: <p>So... I have this code here that i`m using for a quiz and i was wondering if i can make it more efficient... mot of all I want the code to be shorter if possible. If you have some suggestion please tell me! </p>
  
  <pre><code>$("#done").click(function(){
              var c1 = 0,c2 = 0,c3 = 0;
              switch ($("input[name='question1']:checked").val()){
                  case 1: c1++;
                  break;
                  case 2: c2++;
                  break;
                  case 3: c3++;
              }
  
              //repeats 6 times with the number of the question incremented every time
             switch ($("input[name='question8']:checked").val()){
                  case 1: c1++;
                  break;
                  case 2: c2++;
                  break;
                  case 3: c3++;
              }
  
           });
  </code></pre>