TypeScript اسئلة واجوبة المقابلات
فروقات ذات صلة
سؤال 6. What is the 'any' type in TypeScript?
The 'any' type in TypeScript is used to represent a dynamic type that can hold values of any type, and it bypasses type checking.
سؤال 7. How do you declare an array in TypeScript?
Arrays in TypeScript can be declared using the syntax 'let myArray: number[] = [1, 2, 3];' or 'let myArray: Array
سؤال 8. Explain the 'this' keyword in TypeScript.
The 'this' keyword in TypeScript is used to refer to the current instance of the object within a class or function.
سؤال 9. What is a module in TypeScript?
A module in TypeScript is a way to organize code into separate files, and it can include interfaces, classes, functions, and variables.
سؤال 10. What is the use of 'namespace' in TypeScript?
The 'namespace' keyword in TypeScript is used to group related code into a named scope, preventing naming conflicts with other parts of the program.
الاكثر فائدة حسب تقييم المستخدمين:
- What is TypeScript?
- Explain the difference between 'let' and 'const' in TypeScript.
- What are the basic data types in TypeScript?
- How do you define an interface in TypeScript?
- What is the 'any' type in TypeScript?