Hi everyone, completed the mixed messages project. Not sure if I did it corretly, but it does what it suppose to. By the look of the others work, mine looks too simple so therefore I guess I’ve done it wrong. Let me know what you thonk, thank you.
const randomQuotes = [{
author: 'Brian Tracy',
quote: 'Your most valuable asset can be your willingness to persist longer than anyone else.'
},
{
author: 'Harry Browne',
quote: 'Everything you want in life has a price connected to it. There is a price to pay if you want to make things better, a price to pay for leaving things as they are, a price for everything.'
},
{
author: 'Abraham Joshua Heschel',
quote: 'Self respect is the root of discipline; the sense of dignity grows with the ability to say no to oneself.'
},
{
author: 'Earl Nightingale',
quote: 'Happiness is the progressive realization of a worthy ideal.'
},
{
author: 'Henry Emerson Fosdick',
quote: 'No horse gets anywhere until he is harnessed. No stream or gas drives anything until it is confined. No Niagara is ever turned into light and power until it is tunneled. No life ever grows great until it is focused, dedicated, disciplined.'
},
{
author: 'Brian Tracy',
quote: 'Every minute spend on planning, saves 10 minutes in execution.'
},
{
author: 'Chris Pine',
quote: 'Programming is not about what you know, it is about what you can figure out.'
},
{
author: 'No Excuses - Pareto Principle',
quote: 'The Pareto Principle, the 80/20 rule, says that 20 percent of the things you do account for 80 percent of the value of what you accomplish. This means that 80 percent of what you do is worth 20 percent or less of the value of what you accomplish.'
},
{
author: 'If you do not conquer self, you will be conquered by self.',
quote: 'Napoleon Hill'
},
{
author: 'No Excuses',
quote: 'Pay yourself first, saving 10 or 15 percent of your income off the top and then saving 50 percent of your increase for the rest of your career.'
},
{
author: "Parkinson's Law",
quote: 'Expenditures rise to meet income. No matter how much you earn, you end up spending it all, and more besides.'
},
{
author: 'Harry S. Truman',
quote: 'In reading the lives of great men, I found that the first victory they won was over themselves; self discipline with all of them came first.'
},
];
//pick random quote from the array of quotes and return quote and author
const pickQuote = () => {
var item = randomQuotes[Math.floor(Math.random() * randomQuotes.length)];
console.log(`Today's quote: ${item.quote}. Author: ${item.author}.`);
};
pickQuote();