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 Basics (Retired) Storing and Tracking Information with Variables Capturing Visitor Input

Sufiyaan Haroon
seal-mask
.a{fill-rule:evenodd;}techdegree
Sufiyaan Haroon
Full Stack JavaScript Techdegree Student 9,558 Points

But how will the owner of the website know the name?

But how will the owner of the website know the name of the person?

What are you talking about?

2 Answers

Samuel Ferree
Samuel Ferree
31,722 Points

Form submissions usually store that kind of data in a database.

As you continue learning Full stack javascript, you'll learn how to stand up a backend service to save data from your users.

Dominic Davies
Dominic Davies
5,284 Points

Hi Sufiyaan, Each time a new visitor comes to the website, when they type their name the variable visitorName will store their name.
visitorName will hold that vistors name only.

When the program gets more complicated we can used that variable to customize the visitors experience, just like the computer knows the visitors name. Really it only knows the variable. Good luck!