const submitBtn = document.getElementsByTagName('button');
console.log(submitBtn[0]) // returns undefined
const closeBtn = document.getElementsByClassName('fa-times');
console.log(closeBtn[0]); // returns undefined
const submitBtn = document.getElementsByTagName('button');
console.log(submitBtn) // returns an array
const closeBtn = document.getElementsByClassName('fa-times');
console.log(closeBtn); // returns an array
:star2: 1159 | @marmiz |http://www.freecodecamp.org/marmiz
:star2: 3734 | @khaduch |http://www.freecodecamp.org/khaduch
:star2: 3735 | @khaduch |http://www.freecodecamp.org/khaduch
closeBtn
variable after the place where you call appendElem();
(around line 38) and I then see a length of one. So - I'm speculating that when you execute that code around line 16, that you haven't instantiated the element in the document? Could that be true?
Class myModal {
constructor(ble, bla);