New to JS and I feel extremely stupid as the linked js file is not working when I load my index.html file
You can see I have <script> src = "funn.js </script>
and my js file is simply let js = 'test'; if (js === 'test') alert ('test');
But when I reload the page or show the interactive preview from webstorm, I see nothing
2
Answers
src
is an attribute of the<script>
tag. It should be:What’s written between the brackets is actual JavaScript code.
use
src
before closure the tag<script>
In the corresponding questions, do not send the photos, write the code