Hi,
I am just practising some JS questions.
I need to create a circle object with the Object() constructor and a method that will calculate
its circumference.
Can you please advise what is wrong with my code:
<html>
<head><title>Object object</title>
<script type="text/javascript">
var circle = new Object(radius);
circle.radius = radius;
circle.calcCircumference;
function calcCircumference() {
return (Math.PI*Math.Pow(radius,2));
}
</script>
</head>
<body bgColor="#EOFFFF">
<script type="text/javascript">
alert(circle.calcCircumference(3);
</script>
</body>
</html>
thanks