Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. const shape = {
  2. radius: 10,
  3. diameter() {
  4. return this.radius * 2;
  5. },
  6. perimeter: () => 2 * Math.PI * this.radius
  7. };
  8.  
  9. console.log(shape.diameter());
  10. console.log(shape.perimeter());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement