JavaScript Syntax and Structure
Now that we've installed an IDE and established how to manage a working project folder within our code editor, it's time to look at how JavaScript code is written and ordered within such an environment. The first thing we need to do is create a set of files within the Project
folder because we will write our JavaScript instructions in these. We will create a set of files within the working project folder and then bind them to one another.
Exercise 2.02: Creating Project Boilerplate
The most common environment where JavaScript runs is inside a web browser. For JavaScript to run within this environment, it must be included within a host HTML file in some way. Let's create a basic HTML file and a JavaScript file and instruct the web browser to load our JavaScript file within the HTML at runtime. Let's get started:
- Open the working project folder you created previously within your IDE (Visual Studio Code). No files...