Chapter quiz · TypeScript Basics

Test what you learned.

8 questions on TypeScript Basics. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

TS Basics — Chapter Quiz

Eight questions covering primitives, annotations, inference, and type aliases.

0/ 9
  1. Question 1
    1

    What is the main job of TypeScript at build time?

  2. Question 2
    2

    What type does TS infer for let x = 42?

  3. Question 3
    3

    Which annotation correctly types a function returning void?

  4. Question 4
    4

    TS type annotations are emitted in the compiled JavaScript output.

  5. Question 5
    5

    How do you type an array of strings?

  6. Question 6
    6

    The keyword that declares a reusable named type is ___.

  7. Question 7
    7

    Which of these are TypeScript primitive types?

    Select all that apply.

  8. Question 8
    8

    What is the inferred type of colors?

    const colors = ["red", "green", "blue"];
    
Pick an answer — instant feedback as you go.