function rangeOK(range) {
  return range !== null &&
    Array.isArray(range) &&
    range.length === 2 &&
    (range[0] !== null || range[1] !== null);
}
/**
 * Validates the range.
 *
 * @param {Array} range - The range to validate
 * @returns {Boolean} true if range is not null AND range is an array AND
 *  range array has two elements AND at least one of its two elements is not
 *  null
 */
Validates the range.
@param {Array} range - The range to validate
@returns {Boolean} true if range is not null AND range is an array AND
range array has two elements AND at least one of its two elements is not
null
Validates the range . @param { Array } range - The range to validate @returns { Boolean } true if range is not null AND range is an array AND range array has two elements AND at least one of its two elements is not null
function rangeOK(range) {
  return range !== null &&
    Array.isArray(range) &&
    range.length === 2 &&
    (range[0] !== null || range[1] !== null);
}
function rangeOK ( range ) { return range !== null && Array . isArray ( range ) && range . length === 2 && ( range [ 0 ] !== null || range [ 1 ] !== null ) ; }
Validates the range.
Validates the range .