Skip to content

Conversation

@NikitaMelanin
Copy link

No description provided.

@sadyan42 sadyan42 assigned loozmax and unassigned sadyan42 Oct 5, 2021
return date >= this.vacationStartDate && date <= this.vacationEndDate;

}
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 балла

*/

function Organaizer(meetings = [], vacations = []) {
this.meetings = meetings;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Проверка на входные данные?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У нас же указано, что поступает: "массив данных", зачем делать проверку?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Затем, что мне ничего не запрещает прокинуть туда что-то иное.

*/
function Time(hours, minutes) {
}
if (hours < 0 || hours > 24 || minutes < 0 || minutes > 60) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А если строка

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А так разве изначально не понятно, что будет введено число?

*/
function Meeting(meetingDate, startTime, endTime) {
}
if (startTime.hours < 8 || endTime.hours > 19 || startTime > endTime){
Copy link

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);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не все возможные случаи

@loozmax
Copy link

loozmax commented Oct 5, 2021

В принципе ок, поправь замечания

*/
function Meeting(meetingDate, startTime, endTime) {
}
const {Time} = require("../task-1");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

все импорты в начале файла

*/

function Organaizer(meetings = [], vacations = []) {
if(!Array.isArray(meetings) && !Array.isArray(vacations)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо сделать проверку, что массив meetings принадлежит инстансу класса Meeting, а vacations инстанс Vacation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants