mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-14 11:22:40 +02:00
Fix js prototype example
It would also print myBoolean from prototype's prototype
This commit is contained in:
parent
de80ef8605
commit
2570367605
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user