  /**
   * ========= Functions ==========
   */
  function generatePlus(maxExercises) {
    var plus = [];
    for(var i = 1; i <= maxExercises; i++) {
      plus.push({
        number: i,
        numberA: Math.round(Math.random() * 10),
        numberB: Math.round(Math.random() * 10)
      });
    }
    return plus;
  }
  
  //maybe in the future we can add some logic here. Eg. only plus results
  function generateMinus(maxExercises) {
    var minus = [];
    for(var i = 1; i <= maxExercises; i++) {
      minus.push({
        number: i,
        numberA: Math.round(Math.random() * 10),
        numberB: Math.round(Math.random() * 10)
      });
    }
    return minus;
  }
  
  function generateMultiply(maxExercises) {
    var multiply = [];
    for(var i = 1; i <= maxExercises; i++) {
      multiply.push({
        number: i,
        numberA: Math.round(Math.random() * 10),
        numberB: Math.round(Math.random() * 10)
      });
    }
    return multiply;
  }
  
  function generateDivide(maxExercises) {
    var counter = 1;
    var divide = [];
    while(counter <= maxExercises) {
      var numA = Math.round(Math.random() * 50);
      var numB = Math.round(Math.random() * 50);
      if(isInt(numA / numB) && numB !== 0) {     
        divide.push({
          number: counter,
          numberA: numA,
          numberB: numB
        });
        counter++;
      }
    }
    return divide;
  }
  
  function setNumbers(numA, numB) {
    $('.random-num-a').text(numA);
    $('.random-num-b').text(numB);
  }
  
  function isInt(n) {
    return n % 1 === 0;
  }