First, Im away from keyboard, just checking on my phone over jsconsole app. Second, i got a simple snippet like this:
const foo = document.getElementsByClassName('bar');
foo instanceof HTMLCollection // true
foo[0] instanceof HTMLElement // false
I just wondering why foo[0] return false when the element it doesnt exist. Is that caused by undefined element? Or what? Any refer to this? Please give me some quotes, thankyou!