From 0eede5871242b59c0b11416cfa799d0896ace364 Mon Sep 17 00:00:00 2001 From: totize Date: Sun, 27 Jan 2019 16:06:20 +0100 Subject: [PATCH] Update article.md --- 1-js/06-advanced-functions/06-function-object/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/06-advanced-functions/06-function-object/article.md b/1-js/06-advanced-functions/06-function-object/article.md index f334f88b..37839779 100644 --- a/1-js/06-advanced-functions/06-function-object/article.md +++ b/1-js/06-advanced-functions/06-function-object/article.md @@ -153,7 +153,7 @@ alert( `Called ${sayHi.counter} times` ); // Called 2 times ```warn header="A property is not a variable" A property assigned to a function like `sayHi.counter = 0` does *not* define a local variable `counter` inside it. In other words, a property `counter` and a variable `let counter` are two unrelated things. -We can treat a function as an object, store properties in it, but that has no effect on its execution. Variables never use function properties and vice versa. These are just parallel words. +We can treat a function as an object, store properties in it, but that has no effect on its execution. Variables never use function properties and vice versa. These are just parallel worlds. ``` Function properties can replace closures sometimes. For instance, we can rewrite the counter function example from the chapter to use a function property: