function hex(x,y,side,isLast,color)
{//Hex object constructor.
this.x = x;
this.y = y;
this.side = side;
this.isLast = isLast;
this.color = color;
function multiply()
{
return this.x * this.y;
}
this.multiply = multiply;
}
var hexagon = new hex(22,22,20,0,1);
document.write(hexagon.multiply);
When loading index.htm, results that writes on screen the function instead of the returning value:
function multiply() { return this.x * this.y; }
:(