summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKonstantin L <sw.double@gmail.com>2019-01-21 16:04:23 +0300
committerGitHub <noreply@github.com>2019-01-21 16:04:23 +0300
commit25703676055e3db817e95ca184a04e0f9761ac24 (patch)
tree61c7b08d63837166e7716e7cf692ba93075d7706
parentde80ef860519abe0457d88f3fea87cb89eca6069 (diff)
Fix js prototype example
It would also print myBoolean from prototype's prototype
-rw-r--r--javascript.html.markdown1
1 files changed, 1 insertions, 0 deletions
diff --git a/javascript.html.markdown b/javascript.html.markdown
index ecaf02c5..c466c09b 100644
--- a/javascript.html.markdown
+++ b/javascript.html.markdown
@@ -510,6 +510,7 @@ for (var x in myObj){
// Hello world!
// 43
// [Function: myFunc]
+// true
// To only consider properties attached to the object itself
// and not its prototypes, use the `hasOwnProperty()` check.