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 Create a Reusable Fetch Function

URL as template literal?

Guil called a URL that was referenced inside a template literal... wouldn't a URL in a template literal as regular text just be recognized as a string/regular text?? How can the function recognize it as a link?

2 Answers

I'd go with,

let url = `https://website.com`

We know that a template literal uses backticks instead of a regular string which uses quotation '
I think the compiler or whatever is set so when there is backtick it knows to look for the template literal syntax ${}