Skip to content

Instantly share code, notes, and snippets.

@bjf5201
Last active June 12, 2022 18:02
Show Gist options
  • Save bjf5201/20dae11a80fdc2535c1c5bc14aa3e62c to your computer and use it in GitHub Desktop.
Save bjf5201/20dae11a80fdc2535c1c5bc14aa3e62c to your computer and use it in GitHub Desktop.
2022 Reading Goal
// 2022 Reading Goal
// Use let for bookGoal in case I need to re-baseline the goal
let bookGoal = 100
// Const is used here since the number of weeks in a year does not change
const numWeeks = 52
// let is used here since let is used with book goal
let weeklyBooksReadGoal = bookGoal / numWeeks;
// I'm not including the entire reading list here at first, just the first few titles, so I don't want the array to be immutable
let readingList = [
{
"title": "Can't Hurt Me",
"author": "David Goggins",
"pages": 364,
"pub-date": new Date('2018-11-15'),
},
{
"title": "Atomic Habits",
"author": "James Clear",
"pages": 322,
"pub-date": new Date('2018-10-16'),
},
{
"title": "The Subtle Art of Not Giving A F*ck",
"author": "Mark Manson",
"pages" 224,
"pub-date": new Date('2016-09-16'),
}
{
"title": "Ego is the Enemy",
"author": "Ryan Holiday",
"pages": 256,
"pub-date": new Date('2016-06-14'),
}
];
// For the following formulas to be accurate, I need to complete the remaining 97 books that need to be added to the above reading list.
// This would be more effectively done via a JSON or XML file.
let pageCount =
@bjf5201
Copy link
Author

bjf5201 commented Jun 10, 2022

Beginning of my summer reading list formula

TO DO:


  • Create a weekly goal formula that includes pages to read per week
  • Create a daily goal formula that includes pages to read per day

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