I have a problem in JS. I'm getting |ERROR: 'document' is not defined. [no-undef]|document.getElementById("ahmed").innerHTML = "Hello";

document.getElementById(“ahmed”).innerHTML = “Hello”;

You have not provided enough information to help you.

I have noticed this in ESLint in Brackets editor, it’s strange. But it shouldn’t be in freeCodeCamp editor.

Your .eslintrc file should contain a section like this:

    "env": {
        "browser": true,
    }

Type in the first line of the js file
/* global document */

1 Like