DEV Community

loading...

Discussion on: Daily Challenge #281 - Area or Perimeter

Collapse
bidetaggle profile image
bidetaggle

In js: let area_or_perimeter = (x, y) => x === y ? x*y : 2*(x+y);

Pass all the tests.