PRECISO DE CORREÇÃO NO EXECICIO 1 OOJS 1 :
<meta charset="utf-8"/>
<title>OOJS: Task 1</title>
<style>
p {
color: purple;
margin: 0.5em 0;
}
* {
box-sizing: border-box;
}
</style>
<section class="preview">
</section>
function Shape(name, sides, sideLength) {
this.name = name;
this.sides = sides;
this.sideLength = sideLength;
// function que faz o calculo
this.calcPermiter = function(){
return console.log((this.sides)*+this.sideLength)
}
}
// adicionar um novo metodo ao Shape
let square = new Shape("Square", 2,5)
square.calcPermiter();
let triangle = new Shape("triangle", 2,3)
triangle.calcPermiter()
(sem tags script eu retirei pra carregar o codigo no site)
SEGUE O LINK DO EXERCICIO : https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Test_your_skills:_Object-oriented_JavaScript