mirror of
https://github.com/gibbok/typescript-book
synced 2024-11-16 19:47:27 +01:00
parent
ca6580b231
commit
c0e042aeb5
1 changed files with 1 additions and 1 deletions
|
@ -2872,7 +2872,7 @@ The constructor is defined using the `constructor` keyword. It takes name and ag
|
|||
|
||||
The class has a `public` method named sayHi that logs a greeting message.
|
||||
|
||||
To create an instance of a class in TypeScript, you can use the `new` keyword followed by the class name, followed by parentheses `()``. For instance:
|
||||
To create an instance of a class in TypeScript, you can use the `new` keyword followed by the class name, followed by parentheses `()`. For instance:
|
||||
|
||||
<!-- skip -->
|
||||
```typescript
|
||||
|
|
Loading…
Reference in a new issue