javascript的prototype继承问题

代码:

<script type="text/javascript">
        function classAA() {
            this.a = function () { alert(); };
        }
        function classBB() {
            this.b = function () { alert(); };
        }
        classBB.propertyIsEnumerable = new classAA();
        var objB1 = new classBB();
        var objB2 = new classBB();
        alert(objB1.a == objB2.a);
        alert(objB1.b == objB2.b);
    </script>

结果:alert(objB1.a == objB2.a);得到的结果是true

         alert(objB1.b == objB2.b);得到的结果是false

问题:为什么是这样的结果?请教其中的原理!!!

原文地址:https://www.cnblogs.com/joyceTING/p/2818532.html