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
Нужно больше функций #2
Нужно больше функций #2
Conversation
js/main.js
Outdated
@@ -0,0 +1,15 @@ | |||
function getRandomInt(min, max) { |
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.
не решена часть задачи с проверкой min, max меньше нуля, min больше max
js/main.js
Outdated
} | ||
|
||
|
||
function checkStringLenght(str, maxLenght) { |
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.
мы договорились на прошлом занятии не использовать function declaration
js/main.js
Outdated
|
||
|
||
function checkStringLenght(str, maxLenght) { | ||
if (str.length <= maxLenght){ |
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.
так как условие уже само по себе и есть true/false то можно сразу вернуть результат проверки
@@ -0,0 +1,13 @@ | |||
const getRandomInt = (min, max) => { | |||
if (min < 0 || max > 0) { |
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.
max < 0
🎓 Нужно больше функций