Skip to content

Hamed R.#6

Open
HamedRazizadeh-hub wants to merge 1 commit intoHackYourAssignment:mainfrom
HamedRazizadeh-hub:main
Open

Hamed R.#6
HamedRazizadeh-hub wants to merge 1 commit intoHackYourAssignment:mainfrom
HamedRazizadeh-hub:main

Conversation

@HamedRazizadeh-hub
Copy link

No description provided.

@github-actions
Copy link

📝 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

@mo92othman mo92othman self-assigned this Feb 21, 2026
Copy link

@mo92othman mo92othman left a comment

Choose a reason for hiding this comment

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

Hi @HamedRazizadeh-hub , overall, very good work 👍
You met the assignment requirements, and your code is clear! Well done!

Comment on lines 33 to +36
function addBook(book) {
// TODO: Implement this function
const books = loadBooks();
books.push(book);
saveBooks(books);

Choose a reason for hiding this comment

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

You implemented addBook(book), but your app flow does not show adding a new book. So you didn't use this function, as the instructions ask for that in the app features.

Comment on lines +24 to +28
try {
fs.writeFileSync(BOOKS_FILE, JSON.stringify(books, null, 2));
} catch (e) {
console.log(chalk.red('Error saving books:', e.message));
}

Choose a reason for hiding this comment

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

One small improvement: in saveBooks, you log errors but don’t return anything. In larger applications, it’s often helpful to return true/false or re-throw the error for better error handling.

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