What is the difference between HTMLCollection returned by getElementsByTagName and getElementsByClassName?

Hello! Help, I beg you. Already 4 tomatoes (2 hours) spent on this question .

Why eventListener only works on version №0 ? (code below)
Why in option 1 length = 1, and the second length = 0 if there in the console we see that it is the same HTMLCollection?
Descriptions on TagName and ClassName are the same, have read and MDN, and Cantor, and the w3c:
"The NodeList object represents a collection of nodes. The nodes can be accessed by index numbers. The index starts at 0."
So why do they return different things?

Looking for the text in three ways:
var paragraph0 = document.querySelectorAll("p");
var paragraph1 = document.getElementsByTagName("p");
var paragraph2 = document.getElementsByClassName("p");

And I see in the console:
August 19th 19 at 23:04
3 answers
August 19th 19 at 23:06
Read the tag, the class and the selector. Then will it become clear how your question is simple, how long do I need to explain why you get DIFFERENT collections.
About messages in the console, I recommend reading about type coercion in JavaScript, in particular how objects are converted to strings.
Wildest excuse me, I'm horribly mistyped: I was looking for a nonexistent class.
Now I have theory and practice converge.
But why do You say that these are two different collections? It is clear that they occupy different memory addresses, i.e. it is not one and the same collection. But they are the same in essence? - Alford.Mohr commented on August 19th 19 at 23:09
: Different in terms of content. That is the one and the other are instances of HTMLCollection, but the collections contain different elements depending on what choose. In essence they are the same, Yes. - moses.Glov commented on August 19th 19 at 23:12
: Thank you very much. - Alford.Mohr commented on August 19th 19 at 23:15
August 19th 19 at 23:08
HTMLCollection is a dynamic collection that changes in the DOM tree, with which it is associated, will change the contents of the collection
NodeList is static and contains only those elements that were present in the tree at the time of request
August 19th 19 at 23:10
// By tag, find all the <p>....</p>
var paragraph1 = document.getElementsByTagName("p");

// The class that will find all <div class ' ="p">....</div> (tag can be any)
var paragraph2 = document.getElementsByClassName("p");

Find more questions by tags HTMLJavaScriptWeb Development