With another member of your cohort, complete the Free Code Camp 'Quote Generator' project. Keep it simple, it's well within your capabilities. And don't look at the sample solution until you're done!
Although in theory you could complete the assignment by building an array of quotes and drawing from that at random, the idea is to have your first experience using a quotes API like They Said So. Because you might encounter cross-origin errors, we suggest consulting the CORS survival guide.
If you can't get adequate communication with a pair, complete the exercise on your own.
Change driver-navigator roles approx. every 30 mins.
[x] Reverse pseudocode the sample solution in a waffle comment below. Remember, there is no 'right way'.
[ ] Spend 10 minutes asking each other these questions:
Make sure your feedback is ASK (actionable, specific, kind).
[ ] What did you find awesome about our pairing session?
[ ] What could have been more awesome?
This question and answer may feel difficult, but it is a very valuable learning tool. It can be kind to gently help someone identify their weaknesses so that they can work on them. Remember too that your pair may not completely understand the concept in question, so take their feedback with a grain of salt.
"generate" function contains a variable "quotes" which is an array of quotes and their authors.
"generate" function contains a variable "randomQuote" which uses a math random method to generate the index of a random quote within the "quotes" array.
"randomQuote" then splits the string into two - the quote and the author with "@" as the seperator.
The quote and author are then pushed to the DOM with a jquery ($) function.
An event listener is added so that when the new quote button is clicked, the "generate" function is called again and a new quote and author is given.
7.0 Build a quote generator (pair) ~ 6 hrs
Here's your first chance to pair program!
With another member of your cohort, complete the Free Code Camp 'Quote Generator' project. Keep it simple, it's well within your capabilities. And don't look at the sample solution until you're done!
Although in theory you could complete the assignment by building an array of quotes and drawing from that at random, the idea is to have your first experience using a quotes API like They Said So. Because you might encounter cross-origin errors, we suggest consulting the CORS survival guide.
If you can't get adequate communication with a pair, complete the exercise on your own.
With your pair: (if possible)
quote-generator
.