function randomWord(){
  var numGenerated = randomizer();
  var wordGenerated;

  //Use local storage check which language was selected
  //Find the word in the selected lang
  if(language === 'spanish'){
    wordGenerated = wordObjectArray[numGenerated].spanish;
  } else if(language === 'french'){
    wordGenerated = wordObjectArray[numGenerated].french;
  } else if(language === 'latvian'){
    wordGenerated = wordObjectArray[numGenerated].latvian;
  } else if(language === 'german'){
    wordGenerated = wordObjectArray[numGenerated].german;
  }
  //Tracks number of missiles being displayed
  missileTracker++;
  //Stop creating missiles when we reach the specified amount
  if(missileTracker === numOfMissiles){
    prevNumArray = tempNumArray;
    tempNumArray = [];
    missileTracker = 0;
  }
  return wordGenerated;
}
//Checks to make sure number of missiles is the specified amount
Checks to make sure number of missiles is the specified amount
Checks to make sure number of missiles is the specified amount
function randomWord(){
  var numGenerated = randomizer();
  var wordGenerated;
  if(language === 'spanish'){
    wordGenerated = wordObjectArray[numGenerated].spanish;
  } else if(language === 'french'){
    wordGenerated = wordObjectArray[numGenerated].french;
  } else if(language === 'latvian'){
    wordGenerated = wordObjectArray[numGenerated].latvian;
  } else if(language === 'german'){
    wordGenerated = wordObjectArray[numGenerated].german;
  }
  missileTracker++;
  if(missileTracker === numOfMissiles){
    prevNumArray = tempNumArray;
    tempNumArray = [];
    missileTracker = 0;
  }
  return wordGenerated;
}
function randomWord ( ) { var numGenerated = randomizer ( ) ; var wordGenerated ; if ( language === 'spanish' ) { wordGenerated = wordObjectArray [ numGenerated ] . spanish ; } else if ( language === 'french' ) { wordGenerated = wordObjectArray [ numGenerated ] . french ; } else if ( language === 'latvian' ) { wordGenerated = wordObjectArray [ numGenerated ] . latvian ; } else if ( language === 'german' ) { wordGenerated = wordObjectArray [ numGenerated ] . german ; } missileTracker ++ ; if ( missileTracker === numOfMissiles ) { prevNumArray = tempNumArray ; tempNumArray = [ ] ; missileTracker = 0 ; } return wordGenerated ; }
Checks to make sure number of missiles is the specified amount
Checks to make sure number of missiles is the specified amount
//Use local storage check which language was selected //Find the word in the selected lang //Tracks number of missiles being displayed //Stop creating missiles when we reach the specified amount