Returns a reference to the Object function that created the instance's prototype. 注意这个属性的值是函数本省的引用,而不是一个包含函数名的字符串.这个值只有对primitive values(例如1,true和"test"等)才是只读的. Description All objects inherit a constructor property from their prototype: var o =…
一.Object类中的equals()方法 equals(Object obj) :指示其它某个对象是否与此对象"相等". 返回值类型是boolean Oblect类中的equals方法 public boolean equals(Object obj) 姓名和年龄都同样,为同一个人 假设要比較两个人是否为同一个人,Person类就要复写equals方法 class Person { private String name; private int age; public Person…
1. Object is an instance of Function.2. Object does not have a property called constructor so when we call Object.constructor, it actually gives us Object.[[prototype]].constructor (akaObject.__proto__.constructor).3.Object.constructor (aka Object.__…
Constructor vs object A constructor is a special member function in the class to allocate memory to an object. It can be used to provide values for the data members. The constructor is invoked when the object is created. It has the same name as the c…
JavaScript面向对象的理解 笔记链接: http://pan.baidu.com/s/1c0hivuS 1:JavaScript 中分两种对象,函数对象和普通对象new Function() 创建的对象都是函数对象.其他的都是普通对象.函数对象 例: function f1(){}; var f2 = function(){}; var f3 = new Function('str','console.log(str)'); 普通对象 例: var o3 = new f1(); var…