Scripts should moved into their own files instead of embedding them directly inside of the HTML. For example, if you move your JavaScript into a file called fragmentViz.js
, then you can include it in an html page like this:
<script src="fragmentViz.js"></script>
In modern JavaScript, var
has been replaced with const
and let
. For example, instead of writing: