I NEED CORRECTION IN EXERCISE 1 STORE 1 :
OOJS: Task 1function Shape(name, sides, sideLength) {
this.name = name;
this.sides = sides;
this.sideLength = sideLength;
// function that does the calculation
this.calcPermiter = function(){
return console.log((this.sides)*+this.sideLength)
}
}
// add a new instance to Shape
let square = new Shape("Square", 2,5)
square.calcPermiter();
let triangle = new Shape("triangle", 2,3)
triangle.calcPermiter()
(no script tag I took to load the code on the site)
FOLLOW THE EXERCISE LINK : https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Test_your_skills:_Object-oriented_JavaScript