Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions oop.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions src/oop/es6-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}