From 25703676055e3db817e95ca184a04e0f9761ac24 Mon Sep 17 00:00:00 2001 From: Konstantin L Date: Mon, 21 Jan 2019 16:04:23 +0300 Subject: Fix js prototype example It would also print myBoolean from prototype's prototype --- javascript.html.markdown | 1 + 1 file changed, 1 insertion(+) 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. -- cgit v1.2.3