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

JavaScript

Why the quiz doesn't take pointer function expression?

when i handle the last topic "handling error", i added fail() to $.get(), but when i add callback function inside of the fail(), the pointer expression for " jqXHR => { //implementation }" not pass checking, only the "function(jqXHR){ //implementation}" can pass the checking. Why?

Can you post code?

Steven Parker
Steven Parker
243,656 Points

Also please provide a link to the course page.

Hi, this is code, and link will be post below: *** Code starts *** $.get("missing.html", function(data) { $("#footer").html(data); }).fail(function(jqXHR){ alert(jqXHR.statusText); }); *** Code ends ****

or WHY I CAN'T use function pointers here like:

*** Code starts *** $.get("missing.html", function(data) { $("#footer").html(data); // check this part i used function pointer }).fail((jqXHR) => { alert(jqXHR.statusText); }); *** Code ends ****

Here is the quiz link: "https://teamtreehouse.com/library/ajax-basics/jquery-and-ajax/handle-ajax-failures-with-jquery"

Thanks guys!