Skip to content

Commit 803f3c1

Browse files
Update concepts/type-checking/about.md
Co-authored-by: Derk-Jan Karrenbeld <[email protected]>
1 parent 88da8ba commit 803f3c1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

concepts/type-checking/about.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,17 @@ const espresso = new Coffee();
119119
```
120120

121121
````exercism/note
122-
`in` can be slightly unreliable, as it will return `true` for inherited properties and methods.
122+
`in` will return `true` for inherited properties and methods.
123+
123124
```javascript
124125
"coolDown" in espresso
125126
// => true
126127
127128
"constructor" in espresso
128129
// => true
129130
```
130-
To avoid this, use the hasOwnProperty() method.
131+
132+
To avoid this, use `Object.hasOwn()` instead
131133
````
132134

133135
## The `Object.hasOwn()` function

0 commit comments

Comments
 (0)