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

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?

If a visitor puts their name on the website then how will the owner know the name of the visitor?

2 Answers

Samuel Ferree
Samuel Ferree
31,721 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!