Note 5
February 8, 2021•478 words
var available = [10,15,17,21,21,24,22,24,15,32,34,17,44,47,29,37,36,52,38,36,37,24,25,10,13,18,19,23,24,33,34].sort();
available = [...new Set(available)];
available = available.sort(function(a, b){return a-b});
console.log(available);
var possible = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54];
var have = [5,9,7,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,29,32,33,34,36,37,38,40,41,44,46,47,52];
var booksThatAreAvailableAndNotOwned = available.filter(b => !have.includes(b));
var booksThatAreLeftToAquire = possible.filter(b => !have.includes(b));
var titles = ['Volume 1 The Great Conversation',
'Volume 2 Syntopicon I: Angel, Animal, Aristocracy, Art, Astronomy, Beauty, Being, Cause, Chance, Change, Citizen, Constitution, Courage, Custom and Convention, Definition, Democracy, Desire, Dialectic, Duty, Education, Element, Emotion, Eternity, Evolution, Experience, Family, Fate, Form, God, Good and Evil, Government, Habit, Happiness, History, Honor, Hypothesis, Idea, Immortality, Induction, Infinity, Judgment, Justice, Knowledge, Labor, Language, Law, Liberty, Life and Death, Logic, and Love',
'Volume 3 Syntopicon II: Man, Mathematics, Matter, Mechanics, Medicine, Memory and Imagination, Metaphysics, Mind, Monarchy, Nature, Necessity and Contingency, Oligarchy, One and Many, Opinion, Opposition, Philosophy, Physics, Pleasure and Pain, Poetry, Principle, Progress, Prophecy, Prudence, Punishment, Quality, Quantity, Reasoning, Relation, Religion, Revolution, Rhetoric, Same and Other, Science, Sense, Sign and Symbol, Sin, Slavery, Soul, Space, State, Temperance, Theology, Time, Truth, Tyranny, Universal and Particular, Virtue and Vice, War and Peace, Wealth, Will, Wisdom, and World',
'Volume 4 Homer',
'Volume 5 Aeschylus, Sophocles, Euripides, Aristophanes',
'Volume 6 Herodotus, Thucydides',
'Volume 7 Plato',
'Volume 8 Aristotle I',
'Volume 9 Aristotle II',
'Volume 10 Hippocrates, Galen',
'Volume 11 Euclid, Archimedes, Apollonius of Perga, Nicomachus of Gerasa',
'Volume 12 Lucretius, Epictetus, Marcus Aurelius',
'Volume 13 Virgil',
'Volume 14 Plutarch',
'Volume 15 P. Cornelius Tacitus',
'Volume 16 Ptolemy, Nicolaus Copernicus, Johannes Kepler',
'Volume 17 Plotinus',
'Volume 18 Augustine of Hippo',
'Volume 19 Thomas Aquinas I',
'Volume 20 Thomas Aquinas II',
'Volume 21 Dante Alighieri',
'Volume 22 Geoffrey Chaucer',
'Volume 23 Niccolò Machiavelli, Thomas Hobbes',
'Volume 24 François Rabelais',
'Volume 25 Michel Eyquem de Montaigne',
'Volume 26 William Shakespeare I',
'Volume 27 William Shakespeare II',
'Volume 28 William Gilbert, Galileo Galilei, William Harvey',
'Volume 29 Miguel de Cervantes',
'Volume 30 Sir Francis Bacon',
'Volume 31 René Descartes, Benedict de Spinoza',
'Volume 32 John Milton',
'Volume 33 Blaise Pascal',
'Volume 34 Sir Isaac Newton, Christian Huygens',
'Volume 35 John Locke, George Berkeley, David Hume',
'Volume 36 Jonathan Swift, Laurence Sterne',
'Volume 37 Henry Fielding',
'Volume 38 Charles de Secondat, Baron de Montesquieu, Jean Jacques Rousseau',
'Volume 39 Adam Smith',
'Volume 40 Edward Gibbon I',
'Volume 41 Edward Gibbon II',
'Volume 42 Immanuel Kant',
'Volume 43 American State Papers, Alexander Hamilton, James Madison, John Jay, John Stuart Mill',
'Volume 44 James Boswell',
'Volume 45 Antoine Laurent Lavoisier, Jean Baptiste Joseph Fourier, Michael Faraday',
'Volume 46 Georg Wilhelm Friedrich Hegel',
'Volume 47 Johann Wolfgang von Goethe',
'Volume 48 Herman Melville',
'Volume 49 Charles Darwin',
'Volume 50 Karl Marx, Karl Marx and Friedrich Engels',
'Volume 51 Count Leo Tolstoy',
'Volume 52 Fyodor Mikhailovich Dostoevsky',
'Volume 53 William James',
'Volume 54 Sigmund Freud'];
// console.log(booksThatAreAvailableAndNotOwned,booksThatAreAvailableAndNotOwned.length);
// console.log('Needed and Available');
// booksThatAreAvailableAndNotOwned.forEach(function(book){console.log(titles[book-1])});
console.log('Already Owned');
have.forEach(function(book){console.log(titles[book-1])});
// console.log('Complete List')
// titles.forEach(function(book){console.log(book)});
// available.forEach(function(book){console.log(titles[book-1])});
console.log('LEFT TO GET:')
booksThatAreLeftToAquire.forEach(function(book){console.log(book, titles[book-1]);});