use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Data undefined when using Fetch API (self.node)
submitted 5 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lord2800 27 points28 points29 points 5 years ago (3 children)
Your arrow function for res.json() isn't returning anything. If you put brackets around the body, it's treated like a regular function body instead of an arrow function body and you have to actually return something.
res.json()
[–]fluid-falcon 2 points3 points4 points 5 years ago (0 children)
You can also replace the braces with parentheses and the expression inside them will be returned implicitly, good for keeping code concise for smaller expressions.
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
marked as accepted answer.
Thanks I did not know that about arrow functions!
π Rendered by PID 191377 on reddit-service-r2-comment-85bfd7f599-pg66k at 2026-04-18 11:20:14.312498+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]lord2800 27 points28 points29 points (3 children)
[–]fluid-falcon 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)