<commit_before>function Metronome(tempo, beatsPerMeasure){
  this.tempo = tempo;
  this.beatsPerMeasure = beatsPerMeasure;
}

Metronome.prototype.beatsPerMeasureArray = function(){
  var beatsPerMeasureArray = [];
  for (var i = 1; i <= this.beatsPerMeasure; i++){
    beatsPerMeasureArray.push(i);
  };
  return beatsPerMeasureArray;
} 
}<commit_msg>Create start and updateCounterView metronome methods<commit_after>function Metronome(tempo, beatsPerMeasure){
  this.tempo = Number(tempo);
  this.beatsPerMeasure = Number(beatsPerMeasure);
}

Metronome.prototype.start = function(){
  window.setInterval(this.updateCounterView, 1000, this.beatsPerMeasure);
}
Metronome.prototype.updateCounterView = function(beatsPerMeasure){
  var counter = document.getElementById("metronome-counter");
  var pastBeat = Number(counter.innerHTML);
  if (pastBeat < beatsPerMeasure){
    counter.innerHTML = pastBeat + 1;
  } else {
    counter.innerHTML = 1;
  }
}
{'fraction_non_alphanumeric': 0.11696522655426765, 'fraction_numerical': 0.007376185458377239, 'mean_word_length': 5.597222222222222, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '857188', 'n_tokens_mistral': 315, 'n_tokens_neox': 296, 'n_words': 55}