19. More Kinds of Methods


#1

What is wrong with my code, can you help me?


#2

line 9 in incomplete:

return this.sideLength *;


#3

return this.sideLength * this.sideLength;
It should loke like this


#4

var square = new Object();
square.sideLength = 6;
square.calcPerimeter = function() {
return this.sideLength * 4;
};
// nos ajude a definir um método de area aqui
square.calcArea = function() {
return this.sideLength * sideLength;
};
var p = square.calcPerimeter();
var a = square.calcArea();