Enabling JavaScript Strict Mode1:11
And let's open up that whole directory. Now inside this file, I'm just going to scaffold out a basic website. And we'll include a script tag at the bottom here that will include our JavaScript. And we'll start off by telling it to use strict mode. Strict mode, as its name kind of implies, brings us out of the normal sloppy way that JavaScript handles things that might normally cause silent errors. We'll instead throw exceptions and make our code more stable and less likely to introduce bugs later on. Opening up a terminal window. I'm then going to use php to create a local web server at port 8000 so we can view this
Viewing in Browser1:44
Opening up a terminal window. I'm then going to use php to create a local web server at port 8000 so we can view this in the browser. You could use another local web server, I just happen to have php already installed on my system, so this works for me. Now we can go back in our browser. And opening up http://localhost:8000, we see our blank site, and now we're ready to write some modern JavaScript. In the next video, we'll start learning about a small but integral difference in new JS code.
