Skip to content

Conversation

@homsi6313-art
Copy link

No description provided.

@remarcmij remarcmij self-assigned this Jan 21, 2026
@homsi6313-art homsi6313-art changed the title task 1 week 2 complete Mustafa Homsi Jan 21, 2026
Copy link

@remarcmij remarcmij left a 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.

Comment on lines +12 to +14
console.log(`yes, ${year} is a leap year.`);
} else {
console.log(`no, ${year} is not a leap year.`);

Choose a reason for hiding this comment

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

Mind the casing:

Suggested change
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.`);

Comment on lines +11 to +14
const isAdmin = username == "admin" && password == "Hack1234";
const isUser = username == "user" && password == "7654321";

if (isAdmin || isUser) {

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

Suggested change
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") {

Choose a reason for hiding this comment

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

Suggested change
}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.");

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants