Skip to content

Mohamad Bader AA#11

Open
noneeeed wants to merge 3 commits intoHackYourAssignment:mainfrom
noneeeed:main
Open

Mohamad Bader AA#11
noneeeed wants to merge 3 commits intoHackYourAssignment:mainfrom
noneeeed:main

Conversation

@noneeeed
Copy link

@noneeeed noneeeed commented Feb 4, 2026

No description provided.

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

📝 HackYourFuture auto grade

Assignment Score: 0 / 100 ✅

Status: ✅ Passed
Minimum score to pass: 0
🧪 The auto grade is experimental and still being improved

Test Details

@sycons sycons self-assigned this Feb 8, 2026
Copy link

@sycons sycons left a comment

Choose a reason for hiding this comment

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

Following were implemented:

  • Setup & configure project ✅
  • Create a transactions array ✅
  • Implement required functions ✅
  • Implement display requirements ✅
  • Display summary report ✅
  • Code quality ✅

Great job in your implementation ⭐
You've used javascript well. Your app has good structure (use of modules) and has no outdated comments.

Minor feedback regarding using module.exports. Besides that well done.

},
];

module.exports = transactions;
Copy link

Choose a reason for hiding this comment

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

export default transactions; is more common to use than module.exports = transactions

The way you've done it is the older CommonJS Module way. The newer way is to use export which is ES Modules way.

More info on the history: https://www.w3schools.com/nodejs/nodejs_modules_esm.asp

const transactions = require('./data');
const chalk = require('chalk');

function addTransaction(newTransaction) {
Copy link

Choose a reason for hiding this comment

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

Good descriptive name for the parameter. This increases readability ⭐


function getLargestExpense() {
// TODO: Implement this function
let largest = { amount: 0, description: 'None' };
Copy link

Choose a reason for hiding this comment

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

Good way to make your function fail safe ⭐

const categoryStyled = chalk.yellow(category);

console.log(
`${index + 1}. ${label} ${description} - €${amount} (${categoryStyled})`
Copy link

Choose a reason for hiding this comment

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

Visually it's good to display the amount in green as well. Currently you've only displayed the type in green. Since this is a finance tracker app, it's helpful to highlight the amounts.

console.log(chalk.bold.yellow('\n💰 PERSONAL FINANCE TRACKER 💰'));
console.log('\nAll Transactions:');

transactions.forEach((t, index) => {
Copy link

Choose a reason for hiding this comment

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

Good use of foreach and accessing the index in the callback function parameter. ⭐

@sycons sycons added Reviewed This assignment has been reivewed by a mentor and a feedback has been provided and removed To review labels Feb 13, 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