From ca2c03eb2d73a805d4775900c6ef28d2defa4086 Mon Sep 17 00:00:00 2001 From: Donny Winston Date: Fri, 19 Jun 2020 12:17:44 -0400 Subject: [PATCH] thing.method(thing) -> thing.method() --- oop.tex | 4 ++-- src/oop/es6-objects.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/oop.tex b/oop.tex index 0e7da20..d6b020d 100644 --- a/oop.tex +++ b/oop.tex @@ -234,8 +234,8 @@ \section{Classes}\label{s:oop-classes} new Rectangle(1.5, 0.5) ] for (let thing of everything) { - const a = thing.area(thing) - const p = thing.perimeter(thing) + const a = thing.area() + const p = thing.perimeter() console.log(`${thing.name}: area ${a} perimeter ${p}`) } \end{minted} diff --git a/src/oop/es6-objects.js b/src/oop/es6-objects.js index e21d09a..a2db4e8 100644 --- a/src/oop/es6-objects.js +++ b/src/oop/es6-objects.js @@ -35,7 +35,7 @@ const everything = [ new Rectangle(1.5, 0.5) ] for (let thing of everything) { - const a = thing.area(thing) - const p = thing.perimeter(thing) + const a = thing.area() + const p = thing.perimeter() console.log(`${thing.name}: area ${a} perimeter ${p}`) }