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 and the DOM (Retiring) Getting a Handle on the DOM Select All Elements of a Particular Type

Does the console make permanent changes to html doc?

.

2 Answers

Steven Parker
Steven Parker
231,268 Points

The reason they don't stay is that changes made to the DOM by the script (or console) exist only in the browser's memory. The original file is in the server, which is completely unaware of what the script is doing (unless it causes a server request to be made).

.

Steven Parker
Steven Parker
231,268 Points

The "script" is the program, and it can be in a separate file (usually with ".js" in the name) or between "<script>" tags in the HTML. Things you enter in the console are not associated with a file, but the server is also unaware of what you do there.