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 trialJoshua Whisenhunt
4,266 PointsUnexpected Token
I'm not certain what the error message "Unexpected Token" means.
const https = require('https');
const request = https.get(`https://teamtreehouse.com/chalkers.json`);
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsHey Joshua,
There are actually a couple of errors in the second line.
First you don't need the variable assignment
request
as thehttps
was already assigned in the first line, so you'll need to removeconst request =
Second, the error you are receiving is because, for some reason, you are using backticks to enclose a string. Those will need to be quotation marks (single or double).
Fix that up and you're good to go. :)
Ella Ruokokoski
20,881 PointsElla Ruokokoski
20,881 PointsI assume he is using backticks because he's attempting to use a template literal