Skip to content

Conversation

@RooshRoosh
Copy link

No description provided.

Copy link
Member

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.

В Python можно писать что-то в духе "def func( **kwargs):", где kwargs словарь с парами "переменная: значение". Тут видимо как-то аналогично, нет?
Видимо качестве "словаря" используем объект с аналогичными парами. В самой функции проверяем наличие полей, если поле присутствует, то оставляем значение, если нет то значение по умолчанию.

function Event( eventvars ) {} ? // evemtvars = { Call = "Событие", Description="Новое событие", Private=false}

Copy link
Member

Choose a reason for hiding this comment

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

Да, так подойдет. #2 (comment)

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.

2 participants