JavaScript

charles bempah
charles bempah
1,108 Points

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
177,843 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>
charles bempah
charles bempah
1,108 Points

Wow basic mistakes. thanks

Steven Parker
Steven Parker
177,843 Points

charles bempah — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!