I am creating a game where number of levels can be unlimited. In order to do so, I decided to have a solid introduction and an ending. The levels in between would be loaded with javascript. If a new level is developed, all that's needed is to load a new .js file like so
<script type="text/javascript" src="game_start.js"></script>
<script type="text/javascript" src="level_1.js"></script>
<script type="text/javascript" src="level_2.js"></script>
<script type="text/javascript" src="level_3.js"></script>
...
<script type="text/javascript" src="game_end.js"></script>
So how can I do that?