Total Questions : 40
Expected Time : 40 Minutes

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

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

3. Which data type represents a collection of values in TypeScript?

4. Which TypeScript feature is used for ensuring code blocks are never reached?

5. What is the purpose of the 'interface' keyword in TypeScript?

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

7. How do you define a class in TypeScript?

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

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

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

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

12. In TypeScript, what is the difference between 'interface' and 'type' when defining a new type?

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

14. In TypeScript, what is the purpose of the 'as' keyword?

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

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

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

18. In TypeScript, what is the purpose of the 'import' statement?

19. What is the TypeScript convention for naming variables?

20. Which programming language is TypeScript based on?

21. Which operator is used to specify a type guard in TypeScript?

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

23. Which TypeScript feature is used to describe the shape of an object, including its properties and their types?

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

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

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

27. How do you define a function in TypeScript?

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

29. What is the purpose of the 'extends' keyword in generic constraints in TypeScript?

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

31. Which TypeScript data type is used for variables that may have a 'null' or 'undefined' value?

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

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

34. What is the TypeScript equivalent of 'console.log()' in JavaScript?

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

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

37. What is the TypeScript convention for naming classes?

38. Which of the following is a valid way to define a string variable in TypeScript?

39. Which TypeScript keyword is used to declare a constant?

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