I'm basically a beginner with JavaScript. I've installed brackets and currently playing around with variables and functions. All the outputs work fine in the console, however I keep getting this error in the editor. https://i.imgur.com/SExglwR.png
How do I go about fixing this?
The no-undef
rule looks out for undefined variable, without any initial assumption on the environment and the global variables (console
for instance).
You can specify that you are in an environment where console
indeed exists, by adding browser
and/or node
envs in your .eslintrc
:
env: {
browser: true,
node: true,
},
More info in the rule doc