Câu hỏi phỏng vấn Typescript
Câu hỏi

What is the default access modifier for members of a class in TypeScript?

Câu trả lời

The default access modifier for members of a class in TypeScript is public. This means that if no access modifier is explicitly specified for class members, they are accessible from anywhere in the program[1][3][5][6][7].

Citations:
[1] https://www.javatpoint.com/typescript-access-modifiers
[2] https://www.studysmarter.co.uk/explanations/computer-science/computer-programming/access-modifiers/
[3] https://dev.to/hassanzo...

middle

middle

Gợi ý câu hỏi phỏng vấn

middle

What is the difference between Private and Protected variables in TypeScript?

senior

How to exclude property from type in TypeScript?

middle

What is the difference between type and interface in TypeScript?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào