Skip to content

c56 week_2 task_2 - #19

Open
someykoku wants to merge 1 commit into
HackYourAssignment:mainfrom
someykoku:task-2
Open

someykoku wants to merge 1 commit into
HackYourAssignment:mainfrom
someykoku:task-2

Conversation

@someykoku

Copy link
Copy Markdown

No description provided.

@RHSebregts RHSebregts left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi again,

Technically this all works well! Good job. If you want you could improve the readability a bit, but only if you feel like it.

Thank you!

Comment thread task-2/login.js
) {
successMessage(`Logged in successfully`);
} else {
incorrectAttempts++;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

smart! Why did you do it here?

Comment thread task-2/login.js
Comment on lines +15 to +22
} else {
incorrectAttempts++;
if (incorrectAttempts >= 4) {
errorMessage(`Login blocked: Too many incorrect attempts`);
} else {
errorMessage(`Incorrect credentials`);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nesting the if inside the else is a bit hard to read. If you can flatten that, that'd be great. Using your function example from Task 1 would be a great way to do that.

@RHSebregts RHSebregts added Reviewed This assignment has been reivewed by a mentor and a feedback has been provided and removed Review in progress labels Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed This assignment has been reivewed by a mentor and a feedback has been provided

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants