diff options
author | Konstantin L <sw.double@gmail.com> | 2019-01-21 16:04:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-21 16:04:23 +0300 |
commit | 25703676055e3db817e95ca184a04e0f9761ac24 (patch) | |
tree | 61c7b08d63837166e7716e7cf692ba93075d7706 | |
parent | de80ef860519abe0457d88f3fea87cb89eca6069 (diff) |
Fix js prototype example
It would also print myBoolean from prototype's prototype
-rw-r--r-- | javascript.html.markdown | 1 |
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. |