I was trying to get used to constructor functions and the protype chain, and I basically got inheritance and everything to work... I was wondering though, if there's something wrong with my way of creating objects of "new types": If I let firefox run this code:
function Point() {
this.x = 0;
this.y = 0;
}
var a = new Array();
var b = new Date();
var c = new Point();
console.log(typeof a,a);
console.log(typeof b,b);
console.log(typeof c,c);
...the console will output:
As you can see, even though all of them are basically objects, for a it says Array, for b Date, but for c only Object instead of Point
My question now is: Is this just a thing of the console, of build-in functions or can I get my point to be a Point?