I'm learning OO JavaScript (again). I've written this simple object
function circle(){
this.radius = 4;
}
circle.prototype.area = function(){
this.radius * this.radius * 3.14;
};
var c = new circle();
c.area();
The value returned by c.area() is undefined. I guess this can only because this.radius is not returning 4, why not?
Math.PIinstead of 3.14.