Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
# Core program week X assignment
HackYourFuture <Track> week X assignment
# Core program week 6 assignment
The week 6 assignment for the HackYourFuture Core program can be found at the following link: https://hub.hackyourfuture.nl/core-program-week-6-assignment

## Implementation Instructions
Provide clear instructions on how trainees should implement the tasks.

### Task 1
Instructions for Task 1

### Task 2
Instructions for Task 2

...

- Implement the requirements in the `reading-list-manager` folder.
- Use the existing file structure.
- You are allowed to create additional files if needed.
13 changes: 13 additions & 0 deletions reading-list-manager/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This is the entrypoint for your application.
// node app.js

// TODO: Implement the main application logic here
// 1. Load books on startup
// 2. Display all books
// 3. Show summary statistics
// 4. Add example of filtering by genre or read/unread status
// 5. Add example of marking a book as read

console.log('📚 MY READING LIST 📚\n');

// Your implementation here
1 change: 1 addition & 0 deletions reading-list-manager/books.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
53 changes: 53 additions & 0 deletions reading-list-manager/readingList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Place here the file operation functions for loading and saving books

function loadBooks() {
// TODO: Implement this function
// Read from books.json
// Handle missing file (create empty array)
// Handle invalid JSON (notify user, use empty array)
// Use try-catch for error handling
}

function saveBooks(books) {
// TODO: Implement this function
// Write books array to books.json
// Use try-catch for error handling
}

function addBook(book) {
// TODO: Implement this function
}

function getUnreadBooks() {
// TODO: Implement this function using filter()
}

function getBooksByGenre(genre) {
// TODO: Implement this function using filter()
}

function markAsRead(id) {
// TODO: Implement this function using map()
}

function getTotalBooks() {
// TODO: Implement this function using length
}

function hasUnreadBooks() {
// TODO: Implement this function using some()
}

function printAllBooks() {
// TODO: Implement this function
// Loop through and display with chalk
// Use green for read books, yellow for unread
// Use cyan for titles
}

function printSummary() {
// TODO: Implement this function
// Show statistics with chalk
// Display total books, read count, unread count
// Use bold for stats
}
Empty file removed task-1/task 1 files
Empty file.
Empty file removed task-2/task 2 files
Empty file.