I am having difficulties including moment.js in my browser code. This is my first time using it and teaching myself to use a library, so any help is appreciated. I have a CDN for moment in my html page:
<!-- jQuery cdn -->
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<!-- moment.js cdn -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/af.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="script.js"></script>
<script type="text/javascript">
var momentTest = moment();
console.log(momentTest); // this is not logging
</script>
Also in my script.js file, I have tried calling it another way with format() like I saw in the docs:
var now = moment().format();
console.log(now); //this is not logging either
But I keep getting a console error - Uncaught ReferenceError: moment is not defined. Can anyone help with this? I saw this article already but it didn't help me (total beginner with moment): How to use Moment.js?