EverydayFun
EverydayFun copied to clipboard
Added my fave Mark Twain quote
I felt compelled to contribute some code. Please disregard the surpriseMe functionality and keep the quote if preferred. However, I thought it might be a nice addition. Thanks.
I felt compelled to contribute some code. Please disregard the surpriseMe functionality and keep the quote if preferred. However, I thought it might be a nice addition. Thanks.
@gitdagray It is indeed a good idea, but, i think there is a mistake in your code. In surpriseMe function, you are supposed to return anything (a riddle , a joke or a quote), but, instead you are returning a complete list of one of them. Correct me, if I am wrong.
Sorry for any confusion, but it only returns one of them. I get one random item of each type, and then I add those three items to the array "items". I then use the same random formula you used in the getRandomItem function, but in this case, it is just selecting one of the three items in the array "items" that I built in the surpriseMe function. It may not have been confusing it I named the array something else like singleItems. I also tested it in the test.js file. Please run the test to see the results. Thanks!
Sorry for any confusion, but it only returns one of them. I get one random item of each type, and then I add those three items to the array "items". I then use the same random formula you used in the getRandomItem function, but in this case, it is just selecting one of the three items in the array "items" that I built in the surpriseMe function. It may not have been confusing it I named the array something else like singleItems. I also tested it in the test.js file. Please run the test to see the results. Thanks!
@gitdagray Yeah, I get it now what you did there. There is no mistake!!
Thanks! Please accept either just the quote or the full contribution to add to my Hacktoberfest total. Much appreciated :)
Thanks! Please accept either just the quote or the full contribution to add to my Hacktoberfest total. Much appreciated :)
I have labeled your PR, so your contribution will be considered in hacktoberfest. Will definitely merge your PR, just a little later (sorry about that)!!