Just like all the psets before starting pset8 I started to practice some examples from a book, the first program I wrote is giving me this error on my editor but yet the code is running can anyone tell me why I am getting this error and how to get rid of it

enter image description here


The warning is showing up because your JavaScript code (between the <script></script> tags) is using a global variable which is not defined in your script, because it's defined in <script src="../_js/jquery-1.6.3.min.js"></script>.

As the mouseover tooltip helpfully suggests, one way to silence this warning is to declare:

/* global $ */

at the top of your script. This is not strictly necessary, since it's just a warning and not an error. As you have observed, your code runs fine despite the warning.

Hope this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .