You are viewing a single comment's thread. Return to all comments →
class Polygon{ constructor(arr){ this.arr = arr; } perimeter(){ let sum=0; for(let i=0; i<this.arr.length; i++){ sum+=this.arr[i]; } return sum; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 4: Classes
You are viewing a single comment's thread. Return to all comments →