TypeScript · Junior · Question 15 of 75

How do you type an array of strings?

Explanation

string[] and Array<string> are equivalent. [string] is a one-element tuple. For read-only arrays use readonly string[].

Further reading

Problem with a question

TypeScript · Junior · question 15

Test yourself

Take the TypeScript · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz