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 JavaScript Functions Arrow Functions Default Function Parameters

Hello, My learning track was updated for Javascript. The syntax ${} has now been incorporated- what does this mean?

Also instead of my function popping up w/ student (or even undefined when ='student' is taken out) for the exercises it keeps popping up w/ ${name} for function:

function sayHello(name = 'student') { return 'Good morning, (name)!'; }

1 Answer

Steven Parker
Steven Parker
231,248 Points

That appears to be an interpolation token for a template literal. There's a short workshop that focuses on them specifically that you might enjoy: Introducing Template Literals. They are also covered (among other things) in Getting Started With ES2015.