JavaScript

Why won't function work

https://w.trhou.se/fxl07twf7x

I have No idea why the playList function is not working. Maybe its the browser I'm using to preview it (brave).

Please help

2 Answers

Steven Parker
Steven Parker
200,758 Points

The JavaScript code is OK, but the HTML that loads it has the attributes outside of the tags.

To fix it, move the attributes inside the start tags:

<!-- original code -->
<script> src="js/helpers.js" </script>
<script> src="js/playlist.js" </script>

<!-- fixed code -->
<script src="js/helpers.js"></script>
<script src="js/playlist.js"></script>

Wow basic mistakes. thanks