Total Questions : 50
Expected Time : 50 Minutes

1. What is the purpose of TypeScript's 'null' and 'undefined' types?

2. What is the purpose of the 'break' statement in TypeScript?

3. What is TypeScript's 'tuple' data type used for?

4. What is the purpose of TypeScript's 'readonly' modifier?

5. What is the TypeScript feature used to combine multiple types into a single type?

6. In TypeScript, what is the 'any' type used for?

7. What is the use of the 'declare' keyword in TypeScript?

8. Which data type is used to represent a collection of values in TypeScript?

9. What is TypeScript?

10. In TypeScript, how do you declare a variable with a specific type?

11. What is the use of the 'this' parameter in TypeScript functions?

12. What is the purpose of the 'extends' keyword in TypeScript?

13. What is the TypeScript equivalent of JavaScript's 'for...in' loop?

14. What is the purpose of namespaces in TypeScript?

15. Which keyword is used to declare a constant variable in TypeScript?

16. In TypeScript, which of the following is the correct way to define an array of numbers?

17. Which TypeScript feature is used to create a new type that is composed of existing types?

18. What is TypeScript's 'type alias' used for?

19. What is TypeScript's 'type inference'?

20. What is the purpose of TypeScript's 'import' statement?

21. What is TypeScript's equivalent of JavaScript's 'null'?

22. Which of the following correctly describes the 'Partial' utility type in TypeScript?

23. Which keyword is used to declare a variable in TypeScript with a specific type?

24. Which utility type constructs a type by picking the set of properties 'K' from 'T'?

25. What is the purpose of TypeScript's 'typeof' operator?

26. How can you declare a variable that can either be a number or a null in TypeScript?

27. In TypeScript, what is the purpose of the 'namespace' keyword?

28. In TypeScript, how do you define an optional function parameter?

29. How do you define a class in TypeScript?

30. In TypeScript, what is the purpose of the 'try/catch' statement?

31. What is the correct way to annotate a function return type in TypeScript?

32. What does the 'as' keyword do in TypeScript?

33. Which TypeScript feature is used to apply metadata to classes, methods, or properties?

34. What does the 'is' keyword do in a TypeScript type predicate?

35. What is TypeScript's 'export' keyword used for?

36. What is the purpose of TypeScript's 'class' keyword?

37. Which TypeScript keyword is used to indicate that a function doesn't return any value?

38. How do you define a function in TypeScript?

39. Which is the correct way to define a class that implements an interface in TypeScript?

40. What is TypeScript's 'module' system used for?

41. How do you declare a readonly array in TypeScript?

42. In TypeScript, how do you define a function?

43. How do you define a tuple type in TypeScript?

44. What is a discriminated union in TypeScript?

45. Which TypeScript feature is used to make a property or method in a class inaccessible from outside the class?

46. In TypeScript, how do you define a tuple?

47. How do you define an optional property in a TypeScript interface?

48. What TypeScript feature allows for specifying an exact set of string values for a type?

49. What is TypeScript primarily used for?

50. Which of the following is the correct way to define an interface for a function in TypeScript?