code: function convertIntervalToCronTime(interval) {
    const intervalIsEmpty = interval.length === 0;
    const intervalIsTooBig = interval.length > 6;
  
    if (intervalIsEmpty){
      throw new Error(`The interval can not be empty`);
    } else if (intervalIsTooBig) {
      throw new Error('The interval can not contain more than 6 ranges');
    }
  
    const timeArray = fillInterval(interval);
  
    try {
      timeArray[0] = getSecond(timeArray[0]);
      timeArray[1] = getMinute(timeArray[1]);
      timeArray[2] = getHour(timeArray[2], timeArray[1]);
      timeArray[3] = getDayOfMonth(timeArray[3]);
      timeArray[4] = getMonth(timeArray[4]);
      timeArray[5] = getDayOfWeek(timeArray[5]);
    } catch (error){
      throw error;
    }
  
    const cronTime = `${timeArray[0]} ${timeArray[1]} ${timeArray[2]} ${timeArray[3]} ${timeArray[4]} ${timeArray[5]}`;
    return cronTime;
  }
docs: interval = [second, minute, hour, dayOfMonth, month, dayOfWeek]