function getRandomInteger(min, max) {
  // Note that we don't reuse the implementation in the more generic
  // `getRandomIntegers()` (plural) below, for performance optimization.
  return Math.floor((max - min) * Math.random()) + min;
}
Generate a random integer >= min and < max.

@param {number} min Lower bound, inclusive.
@param {number} max Upper bound, exclusive.
@return {number} The random integers.