Last active
June 12, 2022 18:02
-
-
Save bjf5201/20dae11a80fdc2535c1c5bc14aa3e62c to your computer and use it in GitHub Desktop.
2022 Reading Goal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 = |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Beginning of my summer reading list formula
TO DO: