RQ Machine API Help

Tell us what’s happening:
Describe your issue in detail here.
When clicking on the New Quote button, I receive an error in the console.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36.

Challenge: Build a Random Quote Machine

Link to the challenge:

Hello there,

The error is quite self-explanitory - there is no Author property on a quote property of the json response in:

success: function (json) {
        cQuote = $("#quote").html(json.quoteText);
        cAuthor = $("#author").html(json.quote.Author);

All you need to do is figure out what property you actually want. I suggest you do some debugging, and the easiest way would be to console.log the json response to see what it contains.

Hope this helps

Thank you for guiding me to the error. I kept overlooking what was typed. After reviewing the code there were two errors. Corrected them both and the button is working now.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.