An introduction to JavaScript
Welcome
JavaScript is the third of the three technology layers of the Web Standards Model. We often refer to it as the “Behaviour” layer. JavaScript differs from both HTML and CSS because it is an imperative language. HTML and CSS are declarative languages, which means that we use them to tell the browser what we want, and the browser looks after the detail of how that is achieved. By contrast, we use JavaScript to tell the browser exactly what to do and how to do it.
In practical terms, this difference is only apparent when we make mistakes. If we make a mistake with HTML or CSS, the browser will ignore it and display the webpage anyway. If we make a mistake with JavaScript, the browser will simply refuse to run the script. This makes working with JavaScript a slightly more exacting process than working with HTML and CSS.