diff --git a/manuscript/markdown/mainmatter/1.objects/4.composition-and-extension.md b/manuscript/markdown/mainmatter/1.objects/4.composition-and-extension.md index d88c88c..a994b7c 100644 --- a/manuscript/markdown/mainmatter/1.objects/4.composition-and-extension.md +++ b/manuscript/markdown/mainmatter/1.objects/4.composition-and-extension.md @@ -86,7 +86,7 @@ Consider a [queue]: pullHead: function () { var value; - if tail >= head { + if (tail >= head) { value = array[head]; array[head] = void 0; head += 1; @@ -171,4 +171,4 @@ Now we can extend a queue into a deque: Presto, we have reuse through extension, at the cost of encapsulation. -T> Encapsulation and Extension exist in a natural state of tension. A program with elaborate encapsulation resists breakage but can also be difficult to refactor in other ways. Be mindful of when it's best to Compose and when it's best to Extend. \ No newline at end of file +T> Encapsulation and Extension exist in a natural state of tension. A program with elaborate encapsulation resists breakage but can also be difficult to refactor in other ways. Be mindful of when it's best to Compose and when it's best to Extend.