HTMLCollection.prototype居然有length
我编了一段程序看看HTMLCollection.prototype上有什么:
程序代码:<script>
var x=Object.getOwnPropertyNames(HTMLCollection.prototype);
var len=x.length;
for(let i=0;i<len;i++){
document.write(x[i]+" , ");
}
</script>却发现有length!于是我又编了一段程序:
<script> document.write(HTMLCollection.prototype.length); </script>居然抛出错误
有人能给出解释吗






