Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Laura Leistad
Full Stack JavaScript Techdegree Student 6,063 PointsStuck on printQuote function...
I'm stuck on the the step- printQuote constructs a string containing the different properties of the quote object using the following HTML template.
Here's what I got thus far, but when I push the "show another quote" button, it doesn't do anything. Any thoughts??
1 Answer
filmon
4,594 PointsDo the following changes in the 'script.js' file :
Line 6 : replace .
function getRandomQuote (0, 6) {
with
function getRandomQuote (lower, upper) {Line 13 : replace
var nextQuote= getRandomQuote (quotes);
with var nextQuote= getRandomQuote (0, 6);-
Line 16: Add + before the </p> as shown below
'<p class="quote">' + nextQuote.quote + '</p>';
With some more work you can append the source, citation, date and tags.