1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-21 14:02:02 +02:00

Merge pull request #3452 from sw-double/patch-1

[javascript/en] Fix prototype example
This commit is contained in:
Andre Polykanine
2019-02-01 01:43:59 +02:00
committed by GitHub

View File

@@ -510,6 +510,7 @@ for (var x in myObj){
// Hello world! // Hello world!
// 43 // 43
// [Function: myFunc] // [Function: myFunc]
// true
// To only consider properties attached to the object itself // To only consider properties attached to the object itself
// and not its prototypes, use the `hasOwnProperty()` check. // and not its prototypes, use the `hasOwnProperty()` check.