[CODE=javascript]
function Circle(radius)
{
this.radius=rad ius;
this.area=0;
}
Circle.prototyp e.area=function ()
{
if(radius>=1)
this.area=this. radius*(i want to call circumference with argument=false)/2
else
this.area=this. radius*(i want to call circumference with argument=true)/2
}
Circle.prototyp e.circumference =function(varia ble)
{
if(variable)
return 0;
else
return 2*3.14*(this.ra dius)*(this.rad ius);
}
[/CODE]
this is just example .i dont need alternate code; but;how do i call circumfernce method.thats all And sorry if i posted wrong way or wrong format
function Circle(radius)
{
this.radius=rad ius;
this.area=0;
}
Circle.prototyp e.area=function ()
{
if(radius>=1)
this.area=this. radius*(i want to call circumference with argument=false)/2
else
this.area=this. radius*(i want to call circumference with argument=true)/2
}
Circle.prototyp e.circumference =function(varia ble)
{
if(variable)
return 0;
else
return 2*3.14*(this.ra dius)*(this.rad ius);
}
[/CODE]
this is just example .i dont need alternate code; but;how do i call circumfernce method.thats all And sorry if i posted wrong way or wrong format
Comment