this.name = name;
                  
                  
                       alert(name);
                  
                  
                  }
                  
                  
                  
                  
                  
                  When I type:
                  
                  
                   Rabbit.prototype.constructor==Rabbit
                  
                  
                  It evaluates to true
                  
                  
                  So I think the prototype should be: 
                  
                  
                  Rabbit.prototype=={constructor: Rabbit}
                  
                  
                  But it gets evaluated to false
                  
                  
                  What should the prototype equal to? If the last expression is false.
                  
                  
                
javascript can check for equality of references of objects, but not of assignments. {} != {}
Обсуждают сегодня