-
Notifications
You must be signed in to change notification settings - Fork 19
Mustafa Homsi #11
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
base: main
Are you sure you want to change the base?
Mustafa Homsi #11
Conversation
Implement login logic with user authentication and attempt tracking.
remarcmij
left a comment
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.
Hi @homsi6313-art, the tasks are implemented correctly, but pay attention to detail. See my minor comments below. I'll approve your PR as-is.
| console.log(`yes, ${year} is a leap year.`); | ||
| } else { | ||
| console.log(`no, ${year} is not a leap year.`); |
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.
Mind the casing:
| console.log(`yes, ${year} is a leap year.`); | |
| } else { | |
| console.log(`no, ${year} is not a leap year.`); | |
| console.log(`Yes, ${year} is a leap year.`); | |
| } else { | |
| console.log(`No, ${year} is not a leap year.`); |
| const isAdmin = username == "admin" && password == "Hack1234"; | ||
| const isUser = username == "user" && password == "7654321"; | ||
|
|
||
| if (isAdmin || isUser) { |
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.
Use proper indentation, see https://hub.hackyourfuture.nl/Code-style-Basics-2b050f64ffc9807d912ed59b0c72440d
| const isAdmin = username == "admin" && password == "Hack1234"; | |
| const isUser = username == "user" && password == "7654321"; | |
| if (isAdmin || isUser) { | |
| const isAdmin = username == "admin" && password == "Hack1234"; | |
| const isUser = username == "user" && password == "7654321"; | |
| if (isAdmin || isUser) { |
| const eurAmount = usdAmountNum / EUR_USD_RATE; | ||
| console.log(usdAmountNum.toFixed(2) + ' USD is equal to ' + eurAmount.toFixed(2) + ' EUR.'); | ||
| } | ||
| }else if (menuSelection === "3") { |
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.
| }else if (menuSelection === "3") { | |
| } else if (menuSelection === "3") { |
| }else if (menuSelection === "3") { | ||
| console.log("Current exchange rate: 1 EUR = " + EUR_USD_RATE.toFixed(4) + " USD"); | ||
| } else { | ||
| console.log("Invalid selection. Please choose either 1 or 2."); |
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.
You added an option 3, but your error message only mentions 1 or 2.
No description provided.