I'm just trying to get an element from the html file that I'm using in conjunction with my JS file, but I'm running into a ReferenceError of "Can't find variable: document".
The code I'm trying to use is:
var m = document.getElementById("metric");
The javascript file is called in the HTML file:
<script type="text/javascript" src="main.js"></script>
Why isn't "document." working??
Any help would be appreciated! For the record, I'm working in vanilla javascript, not jQuery.