Sorry if this question is stupid, I am normally not doing any frontend stuff and am kind of a noob with JS.
In Firefox DevTools I see the following error message:
Uncaught TypeError: tabHeader is undefined
I have the following code:
let tabHeader=document.getElementsByClassName('tab-header')[0];
let tabsPane=tabHeader.getElementsByTagName('div');
I declared one variable using let, but it still gets read as "undefined"; Further more, if I use consol.log(tabHeader) I also get undefined as output in the console.
I am sure this is easy and I am just being a noob, but what am I doing wrong here?