JavaScript Node.js Basics Building a Command Line Application Making a GET Request with https

What is this syntax? I don't know about this...please help

What is the javascript ${username} means? And why these strings use the ` this mark ?

const message = `${username} has ${badgeCount} total badge(s) and ${points} points in Javascript.`

Anyone could help?

1 Answer

Louise St. Germain
Louise St. Germain
19,375 Points

Hello Tseng,

Those back ticks indicate a template literal, where it fills in anything inside the ${ ... } with the value of the variable that is referenced inside.

You can find out more here in a video: It might be easier for you to watch that (and the next one after it too) than for me to try to explain it all.

I hope this will help explain them!

I will watch the video you suggested. And the video is really clear. Louise St. Germain Thank you !