Skip to content
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

выполнил задание на проверку валидности имени #3

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

ilya-dan
Copy link
Contributor

Сделал в одну строку, не знаю как было бы корректнее. Так или каждое условие отдельно? Или здесь это не играет роли?

@jsru-1
Copy link
Contributor

jsru-1 commented Sep 24, 2024

Добавляю преподавателя (@koalex) для код-ревью.

@jsru-1 jsru-1 requested a review from koalex September 24, 2024 15:58
@@ -10,7 +10,8 @@ function print(text) {
* чтобы функция sayHello работала корректно
*/
function isValid(name) {
// ваш код...
if ( name && name.length >= 4 && !name.includes(" ")) return true
Copy link
Member

Choose a reason for hiding this comment

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

Можно сразу так:
return name && name.length >= 4 && !name.includes(" ");

@jsru-1 jsru-1 merged commit 8fcb714 into js-tasks-ru:master Sep 25, 2024
1 check passed
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