code: function arrayHasValue(arr, value) {
          var idx = arr.indexOf(value);
          if (idx !== -1) {
              return true;
          }
          return false;
      }
docs: Checks to see if a value exists in an array