Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
217,640 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
217,640 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.