```
<!DOCTYPE html>
<html>
<body>
    <div class="dropdowntextbox">
        <input type="text" class="dropdowntext">
        <div class="dropdown-content">
            <a href="#">Hi again</a>
            <a>Hi again</a>
        </div>
    </div>

    <div class="dropdowntextbox">
        <input type="text" class="dropdowntext">
        <div class="dropdown-content">
            <a href="#">Hi again</a>
            <a>Hi again</a>
        </div>
    </div>
    <script>
        alert(document.getElementsByClassName("dropdowntextbox"));
        for (div in document.getElementsByClassName("dropdowntextbox")){
            alert(div.toString());
        }
    </script>
</body>
</html>

```

The alerts of this code return:

```
[object HTMLCollection]
0
1
length
item
namedItem

```

I expected the alerts to give me `[object HTMLCollection]` and then just the two `<div>` elements that have `class="dropdowntextbox"`. What's the reason for this behaviour?