Repository navigation
Conversation
sarlam
left a comment
There was a problem hiding this comment.
This is a spotless work, really good work here
Optionally if you want to be challenged I can propose you two other challenges for you to think about, you do not have to do them or push the code, it is just to keep your skills sharp:
Task 2
- I would like you to imagine that you now have 1000 of users and password, how would it change your code?
- more difficult, as of now we count for 4 attempts overall, could you think of a way to count 4 attempts on a specific username (so if I try 4 times with
adminI can no longer try with it but I can try withuser). How would it change the code
Task 3
- What would happen if you had to implement not one new feature but 20?
You do not have to implement any of those, it is just to challenge you to think a bit more about your code and its limits
Great work
| if (!Number.isInteger(year) || year < 1 || year > 9999) { | ||
| console.log("Invalid year!"); | ||
| } else if (year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)) { | ||
| console.log("Yes, " + year + " is a leap year"); | ||
| } else { | ||
| console.log("No, " + year + " is not a leap year"); | ||
| } No newline at end of file |
There was a problem hiding this comment.
This is a sound and correct code here, nice work
| @@ -4,10 +4,26 @@ import { errorMessage, successMessage } from './app.js'; | |||
| let incorrectAttempts = 0; | |||
|
|
|||
| function onLogin(username, password) { | |||
There was a problem hiding this comment.
This is also a good code that fits perfectly
|
|
Dear sarlam, Thank you so much for the review and the kind words. i will love to challenge myself to the tasks you outlined and continue to learn to sharpen my skills. where and when i am stuck and need assistance, i will reach out to you. once again, i do appreciate the feedback. |
I have completed the Week 2 assignment.
Task 1: Implemented and tested the leap-year calculator, including input validation.
Task 2: Implemented the login system with credential validation and login-attempt restrictions.
Task 3: Fixed the currency converter bugs and added the feature to display the current exchange rate.
I have tested the functionality and pushed my changes to my GitHub fork.
Thank you for reviewing my submission. I look forward to your feedback.
Regards
Onyekachi