Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed JavaScript Quickstart!
You have completed JavaScript Quickstart!
Preview
When working on a project in a text editor, it's common to put all of your JavaScript code into a file that's separate from your HTML file.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
JavaScript code into a separate file
that's separate from your HTML file.
0:00
Just like you would with CSS, for example.
0:02
So now I'm going to open my text editor,
Visual Studio Code.
0:05
So you use the script element to
add JavaScript to an HTML document.
0:08
You can place script tags almost
anywhere in an HTML file.
0:12
But most typically you'll find script tags
placed either in the head of the page or
0:16
within the body of the page just
before the closing body tag.
0:21
I'll place it in the body.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up