-
Notifications
You must be signed in to change notification settings - Fork 27
Melanin Nikita #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Melanin Nikita #28
Conversation
|
||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 балла
@@ -9,6 +9,8 @@ | |||
*/ | |||
|
|||
function Organaizer(meetings = [], vacations = []) { | |||
this.meetings = meetings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Проверка на входные данные?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
У нас же указано, что поступает: "массив данных", зачем делать проверку?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Затем, что мне ничего не запрещает прокинуть туда что-то иное.
topic-3/task-1/index.js
Outdated
@@ -17,6 +17,17 @@ | |||
@param {number} minutes - Минуты | |||
*/ | |||
function Time(hours, minutes) { | |||
} | |||
if (hours < 0 || hours > 24 || minutes < 0 || minutes > 60) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А если строка
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А так разве изначально не понятно, что будет введено число?
topic-3/task-2/index.js
Outdated
@@ -17,6 +17,15 @@ | |||
@param {Time} endTime - Время конца встречи | |||
*/ | |||
function Meeting(meetingDate, startTime, endTime) { | |||
} | |||
if (startTime.hours < 8 || endTime.hours > 19 || startTime > endTime){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А если строка
this.endTime = endTime; | ||
}; | ||
Meeting.prototype.isMeetingInTimeRange = function(start, end) { | ||
return start.isEarlier(this.endTime) && end.isLater(this.startTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не все возможные случаи
В принципе ок, поправь замечания |
topic-3/task-2/index.js
Outdated
@@ -17,6 +17,17 @@ | |||
@param {Time} endTime - Время конца встречи | |||
*/ | |||
function Meeting(meetingDate, startTime, endTime) { | |||
} | |||
const {Time} = require("../task-1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
все импорты в начале файла
topic-3/task-4/index.js
Outdated
@@ -9,6 +9,11 @@ | |||
*/ | |||
|
|||
function Organaizer(meetings = [], vacations = []) { | |||
if(!Array.isArray(meetings) && !Array.isArray(vacations)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Необходимо сделать проверку, что массив meetings принадлежит инстансу класса Meeting, а vacations инстанс Vacation
No description provided.