>> Brian Holt: I wanna show you how to get this working in Visual Studio Code. So let's go and open your Visual Studio Code here. I have a brand new project here, and I'm gonna create a new file, and I'm just gonna put this on my desktop, in a new folder called, experiments, I guess.
>> Brian Holt: And I'm gonna make an index.html.
>> Brian Holt: So we're going to create our index file, which you should have been doing HTML already, I'm sure Jen did a fine job with that. I can never remember the outermost layer of what to put in index files. Luckily, VS Code just kind of does it for me.
>> Brian Holt: Experiments.
>> Brian Holt: And I'm just gonna put a little h1 here, h1.
>> Brian Holt: And then we're gonna put a script tag down here at the bottom.
>> Brian Holt: Oops.
>> Brian Holt: And between the script tag here, it'll execute any code that you put in here.
In the same directory, I want you to go look for an experiments.js file.
>> Brian Holt: Okay, then we're gonna create a new file here. In the same directory as our index.html, and we're gonna call it experiments.js.
>> Brian Holt: So we're gonna put the same thing that we had before there, const monthlyRent = 500; const yearlyRent = monthlyRent * 12 / console.log(yearlyRent).
Now, I want you to open your favorite browser, and you can do Open File here or Cmd+O on Mac, or Ctrl+O on Windows. I think it's Ctrl+O. No, maybe not.
>> Brian Holt: It's not like I work at Microsoft.
>> Brian Holt: Let's see.
>> Speaker 2: In Jen's class, they had the open browser extension.
>> Brian Holt: Yeah.
>> Speaker 2: So they could just right-click on the HTML file and then [INAUDIBLE]
>> Brian Holt: Then do that. [LAUGH]
But we are gonna open our developer console. So Web Developer.
>> Brian Holt: And I wanna open the Web Console.
>> Brian Holt: The other way you can do that is just right clicking and say, Inspect Element here. And then just click on the Console, in your dev tools. I'm using Firefox, but I imagine many of you are using Chrome, probably.
>> Brian Holt: You Google sell outs. Just kidding. I'm kidding. I'm gonna get fired for that one. Okay, it's relatively similar though. So come in here, Desktop > experiments > index.html, Inspect Element. And you click Console and you should see something similar to that one down there. Okay, I'm gonna do it in Firefox, cuz that's what I'm more familiar with.
So you should see that 6000 there, so this is the console. I will make that a little bit bigger so you can probably see it a little better.
>> Speaker 3: When you're linking the script source, the .backslash experiments.js, do you need the .backslash?
>> Brian Holt: Forward slash.
>> Speaker 3: Forward slash?
>> Brian Holt: Yeah.
>> Speaker 3: Okay, do you need those two things if they're in the same file?
>> Brian Holt: So, yeah, let's talk about that. It's a good question. So I'm gonna close this, close that. So the question here is on line 13. Do you need the ./ here? And the answer to that question is, this will work as well.
[00:06:04] I'm sure of that, but let me validate my assumption here. So, ./ means same directory, right? And I put it there just to be explicit, and also just kind of by force of habit. [LAUGH] Jen mentioned that she talked about that ../, means go up a directory, right?
[00:06:25] And ./ means stay in the same directory.