HTML document in browser, console displaying error

Following the steps, an error was displayed so couldn’t proceed further.
1.
After copying the exact code as from bolt iot course-> javascript programming language-> variables in javascript and uploading and saving the file with an extension of .html, i opened in the browser, right clicked and clicked on the inspect option->console->error.
Sending a screenshot of the error displayed too.

@sanjanahajra.kiitece Seems you have not given the correct path to the javascript file. Please copy-paste the my-javascript.js file in the same location as your HTML file and run it again.

Make sure along with the html code you copy the javascript code from the module and save it as my-javascript.js in the same folder where your html file is saved. Then it will surely work.


Try like this using sublime text.Hope this helps

@sanjanahajra.kiitece
After writing your javascript code, just save it using a filename of your own choice
and extension is to be " .js"
Then when you create the html file, make sure that in the html code the name of the javascript file mentioned after “src” in “script” tag is the same name you saved the javascript with in the previous step
Now run the html file. It should solve your error.
However make sure while writing other javascript codes, do not use the same name again. That would erase the one you are dealing with and create the problem you are facing. Hence i suggest you to give the files, names of your own choice. It is easier to remember that way…

Hope this helps!

P.S.: You can use notepad to create the files. I find it very easy to use. It is same as ms-word