Skip to content

Commit 2a177c6

Browse files
authored
Merge pull request #45 from uzair004/patch-1
Bug Fix: Interface code snippet
2 parents b60caa9 + ddcdddf commit 2a177c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ Here are two more advanced examples, we can use an `interface` to define the sub
14181418
}
14191419

14201420
const myPerson = new Person('Robert', 'Molina');
1421-
greet(myPerson); // Prints: "Hi, I am Robert Moina"
1421+
myPerson.greet('Molina'); // Prints: "Hi, I am Robert Moina"
14221422
```
14231423

14241424
> Interfaces describe the **`public` side of the class**, rather than both the `public` and `private` side. This prohibits you from using them to check that a class also has particular types for the private side of the class instance.

0 commit comments

Comments
 (0)