JavaScript the Old Way

The older way of writing JavaScript was just to include different script tags. Those tags might be different libraries or a JavaScript file you wrote.

The Old Way

Step 1: Include a script tag.

Step 2: Write your JavaScript.

Step 3: That's it!

Step 4: Note this could get very complicated as your project starts to rely on lots of other libraries and other dependencies, or has lots of its own files. Then just including script tags isn't so simple anymore...

What This Page Looks Like

Just include the script tags here, no other tools are used.

<!-- Include an external javascript library like jquery -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>

<!-- Include a simple javascript file and it just runs. -->
<script src="oldway.js"></script>

See the New Way

See the code for this page

Samples