The integer to check.
Optionalmin: numberThe minimum value of the range (inclusive). If undefined, only the max is checked.
Optionalmax: numberThe maximum value of the range (inclusive). If undefined, only the min is checked.
true if x is an integer and within the specified range, false otherwise.
Checks if
xis an integer and within a given range (inclusive).It first checks that
xis an integer using isInt. If not, it returns false. Then it delegates the range checking to inRange.