Let's say I want to display all seasons of Family Guy as one number. (15) But of course there will be more seasons so I would have to change in every file the 15 to 16 and so on. That for I want to create a variable for the value so I just have to change it once for all files.
external js.script
var seasons = "15";
document.getElementById('seasons').innerHTML = seasons;
So now I want to include the variable in my HTML files:
<div id="seasons"></div>
It works but after three variables all other are not displayed.
Is there a better way to create variables in an external file?