1 00:00:00,000 --> 00:00:04,928 [MUSIC] 2 00:00:04,928 --> 00:00:08,222 >> When working on a project in a text editor, it's common to put all of your 3 00:00:08,222 --> 00:00:11,900 JavaScript code into a separate file that's separate from your HTML file. 4 00:00:11,900 --> 00:00:14,164 Just like you would with CSS, for example. 5 00:00:14,164 --> 00:00:17,142 So now I'm going to open my text editor, Visual Studio Code. 6 00:00:17,142 --> 00:00:21,870 So you use the script element to add JavaScript to an HTML document. 7 00:00:21,870 --> 00:00:25,594 You can place script tags almost anywhere in an HTML file. 8 00:00:25,594 --> 00:00:30,912 But most typically you'll find script tags placed either in the head of the page or 9 00:00:30,912 --> 00:00:35,430 within the body of the page just before the closing body tag. 10 00:00:35,430 --> 00:00:36,707 I'll place it in the body. 11 00:00:39,100 --> 00:00:41,617 And I'll set the source to main.js, 12 00:00:41,617 --> 00:00:45,088 which is a JavaScript file I created for my project. 13 00:00:48,103 --> 00:00:51,736 When you place your script near the bottom of the page like this it 14 00:00:51,736 --> 00:00:56,129 let's the browser load and display the HTML before running the JavaScript. 15 00:00:56,129 --> 00:00:59,665 Next, I'll teach you more features of JavaScript you'll likely work with daily 16 00:00:59,665 --> 00:01:00,391 as a developer. 17 00:01:00,391 --> 00:01:03,000 Like functions, loops, arrays, and objects. 18 00:01:03,000 --> 00:01:05,343 There's a whole lot more to learn about each of these topics. 19 00:01:05,343 --> 00:01:07,217 But I'll get you started with the basics. 20 00:01:07,217 --> 00:01:09,629 And later give you more information about where to learn more and 21 00:01:09,629 --> 00:01:10,890 practice what you've learned.