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 Loops, Arrays and Objects Tracking Multiple Items with Arrays Useful Array Methods

Don't you have to write ${Search} to recall the input from the prompt?

I learned from past courses that you need to have ${variable} in order to recall from an input of a prompt. Am I wrong?

1 Answer

Steven Parker
Steven Parker
231,236 Points

I'm not sure what you mean by "recall ", but that looks like the syntax for a replacement token in a template literal used to create a string. If you're not using a template literal, that would probably not be correct syntax.

Please show your code so we can see what is being done with it.

I found out what was wrong.

So my question was about displaying a dynamic string on the screen.

And in order to do that we can use ${variable} method. and if I don't use that method, alternative way would be using 'document.write()'.

Steven Parker
Steven Parker
231,236 Points

There are other ways also. But always show the complete code along with the question, little bits of code may not convey the issue.