After loading the moment.min.js library, I test it with a script and it works fine. Then, I try to reference the same moment function in the body of the html document using ejs, I get the error "moment is not defined"
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
<script>
const x = moment().format()
console.log(x)
</script>
then, in the body ...
<body>
<h1><%= moment().format %></h1>
</body>
If I cant solve this, I will have figure a workaround. Ideas?