Well an array of childNodes wont have an array of childNodes themselves. But I assume you mean if you set the variable to the querySelector return
My instinctual response is that its because Javascript isn’t strongly typed. VSCode knows that when you call .querySelector on something, it will return an object of type Element (or null), and so it can tell you from the follow-on what properties and methods that return has. Once it’s been assigned to a variable, it’s just a prototype object. You could have manipulated that object into being anything, redefining methods or properties of the object, so it can’t determine for sure what it is.