function updateScore(bugType){
      if(bugType == 'black'){
          score += 5;
      }else if (bugType == 'red') {
          score += 3;
      }else{
          score += 1;
      }
    }
/*------------------------------------
      Add point when bug is killed.
    --------------------------------------*/
Add point when bug is killed.
Add point when bug is killed .
function updateScore(bugType){
      if(bugType == 'black'){
          score += 5;
      }else if (bugType == 'red') {
          score += 3;
      }else{
          score += 1;
      }
    }
function updateScore ( bugType ) { if ( bugType == 'black' ) { score += 5 ; } else if ( bugType == 'red' ) { score += 3 ; } else { score += 1 ; } }
Add point when bug is killed.
Add point when bug is killed .