<html>
<head>
</head>
<body>
<script type="text/javascript">
function slimshady (height , width )
{
this.Height=height;
this.Width=width;
this.perimeter=perimeter;
this.area=area;
}
Bigx = new slimshady(5 , 3) ;
Smallx = new slimshady(2 ,2 );
function area()
{
return (slimshady.Height*slimshady.Width);
}
function perimeter()
{
return ((slimshady.Height*2)+(slimshady.Width*2)) ;
}
document.write("Bigx perimeter:"+Bigx.perimeter +"<BR><BR>");
document.write("Smallx getarea:"+Smallx.area);
</script>
</body>
</html>
ניסיתי עוד הרבה דברים, ניסיתי לשנות הכל. ובדקתי שזה גם בדיוק כמו שיש במדריך כמעט, אבל אין לא הולך...