Learning JavaScript - Notes: History and Placement of JavaScript
A little backstory on javascript

JavaScript was created by Brendan Eich in 10 days ( HOW CRAZY IS THAT!? )while he was working at Netscape Communications Corporation in May of 1995. Originally dubbed “Mocha” while under development, upon completion, the language was shipped under the name “LiveScript” until it was later renamed “JavaScript” in September of 1995.
Note: Java and JavaScript are two separate languages. Though they share many similarities (such as language name, syntax and respective standard libraries) they are two very different languages.
JavaScript Placement
There are essentially two ways to add JavaScript into an HTML file.
- Directly into your html file surrounded by <script> between the <head> tags or the <body> tags.
This method is great for people learning JavaScript but is not considered best practice.
Example:
2. External JavaScript File
Linking an external JavaScript file into your HTML file is very similar to linking a CSS file. The JavaScript you wish to implement on your page is stored in another folder and called into your HTML wherever you place your link.
Example:
As you can imagine, writing your JavaScript code directly inside your HTML file WILL get messy - SUPER MESSY! In order to keep things manageable its best to use the external linking method to add JavaScript into your HTML file.