# Assessment wanted for OOJS 1/2/3 skill test

**URL:** <https://discourse.mozilla.org/t/assessment-wanted-for-oojs-1-2-3-skill-test/85674>\
**Category:** Learn\
**Created:** [September 9, 2021, 2:28pm UTC](https://discourse.mozilla.org/t/assessment-wanted-for-oojs-1-2-3-skill-test/85674 "2021-09-09T14:28:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harvey25115](https://avatars.discourse-cdn.com/v4/letter/h/34f0e0/32.png) [@harvey25115](https://discourse.mozilla.org/u/harvey25115)\
**Post date:** [September 9, 2021, 2:28pm UTC](https://discourse.mozilla.org/t/assessment-wanted-for-oojs-1-2-3-skill-test/85674/1 "2021-09-09T14:28:47Z")

</div>

Hello! This is my first time posting assessment here. Please help me assess my work. Thank you! 😀

OOJS1

> function Shape(name, sides, sideLength) {  
> this.name = name;  
> this.sides = sides;  
> this.sideLength = sideLength;  
> }  
> // Write your code below here  
> Shape.prototype.calcPerimeter = function() {  
> console.log(this.sides \* this.sideLength);  
> }  
> const square = new Shape(“square”, 4, 5);  
> square.calcPerimeter();  
> const triangle= new Shape(“triangle”, 3, 3);  
> triangle.calcPerimeter();

OOJS2

> class Shape {  
> constructor(name, sides, sideLength) {  
> this.name = name;  
> this.sides = sides;  
> this.sideLength = sideLength;  
> }  
> calcPerimeter() {  
> console.log(this.sides \* this.sideLength);  
> }  
> }  
> const square = new Shape(“square”, 4, 5);  
> square.calcPerimeter();  
> const triangle= new Shape(“triangle”, 3, 3);  
> triangle.calcPerimeter();

OOJS3

> class Shape {  
> constructor(name, sides, sideLength) {  
> this.name = name;  
> this.sides = sides;  
> this.sideLength = sideLength;  
> }  
> calcPerimeter() {  
> console.log(this.sides \* this.sideLength);  
> }  
> }  
> class Square extends Shape{  
> constructor(sideLength) {  
> super(“square”,4,sideLength);  
> }  
> calcArea() {  
> console.log(this.sideLength \* this.sideLength);  
> }  
> }  
> const square = new Square(5);  
> square.calcPerimeter();  
> square.calcArea();

---

<div class="post-metadata">

**Author:** ![mikoMK](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/mikomk/32/50456_2.png) [@mikoMK](https://discourse.mozilla.org/u/mikoMK)\
**Post date:** [September 9, 2021, 11:29pm UTC](https://discourse.mozilla.org/t/assessment-wanted-for-oojs-1-2-3-skill-test/85674/2 "2021-09-09T23:29:45Z")

</div>

Hi @harvey25115 and welcome to the community 👋

Congratulations! All three tasks are correct 🏅

If you like to post more assessments in the future it would be really helpful for us if you put your code into an online editor and post the link. It is much easier for us to assess your work if we see running code and can test different things out.  
Also please make sure to add a link to the task page on MDN.  
You will find these instructions at the bottom of all task pages. For example: [Assessment or further help | MDN](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Test_your_skills:_Object-oriented_JavaScript#assessment_or_further_help)

Thank you and have fun coding 🙂  
Michael

---

<div class="post-metadata">

**Author:** ![harvey25115](https://avatars.discourse-cdn.com/v4/letter/h/34f0e0/32.png) [@harvey25115](https://discourse.mozilla.org/u/harvey25115)\
**Post date:** [September 10, 2021, 2:59am UTC](https://discourse.mozilla.org/t/assessment-wanted-for-oojs-1-2-3-skill-test/85674/3 "2021-09-10T02:59:12Z")

</div>

Oh I forgot about the task page link. Okay noted! Thanks! 🙂
