Week 6 - Advanced topics

Synchronous File IO

File processing

Error handling

Array methods

Closures

Style - How to write meaningful comments

Practice

Assignment

Core program

Week 6 Assignment - Reading List Manager

Build a command-line reading list that saves to files using error handling and array methods.

Project Requirements

Setup & Configuration

Core Functionality

Data Structure

Store books in books.json:

[
  {
    id: 1,
    title: "1984",
    author: "George Orwell",
    genre: "Fiction",
    read: false
  }
  // ... at least 5 books
]

Required Functions

File operations with error handling:

Array method functions:

Display functions:

Error Handling

Must handle:

Display (Chalk)

Required Features

Create working program with:

Example Output

📚 MY READING LIST 📚

All Books:
1. 1984 by George Orwell (Fiction) ✓ Read
2. Dune by Frank Herbert (Sci-Fi) ⚠ Unread
3. The Hobbit by J.R.R. Tolkien (Fantasy) ✓ Read

📊 SUMMARY 📊
Total Books: 3
Read: 2
Unread: 1

Submission

The assignment repository can be found in https://github.com/HackYourAssignment/ with the name cXX-core-week-## (Replace XX with your cohort number and ## with the week number)

Follow the Assignment submission guide to learn how to submit the assignment


CC BY-NC-SA 4.0 Icons

*https://hackyourfuture.net/*

Found a mistake or have a suggestion? Let us know in the feedback form.