
I’m new to javascript but sometimes I want to know if my .js file is properly linked to my site. I found that I can add a simple line command to the file so that it will display in my console log.
In the .js file, simply type:
console.log(“Example”);
Now open your console in the browser. Google chrome has one and you can open it on a Mac by pressing “command” + “option” + “j”
Remember to refresh your page and you will get “Example” to show up in your console log. If it doesn’t show, you have a problem with your link.