我正在尝试将代码从ATOM运行到我的控制台,并且出现了一个我不理解并且无法显示该功能的错误。
代码的编写方式与我的类中的代码完全相同(第3屏幕)。
[index image][1]
[JS image][2]
[Console Image][3]
[Image of instructor screen][4]
[1]: https://i.stack.imgur.com/EFZiL.png
[2]: https://i.stack.imgur.com/SvoJT.png
[3]: https://i.stack.imgur.com/pCjX6.png
[4]: https://i.stack.imgur.com/J26PQ.png
答案 0 :(得分:0)
You are not including your Javascript file in your html. In order for the code you have written to be executed when you open the index.html file in your browser, the javascript needs to be included. To include a javascript file add a <script>
tag in your <head>
.
<script src='/js/myJavascriptFile.js'></script>