TypeScript · Junior · Question 19 of 75

What does Record<string, number> describe?

Explanation

Record<K, V> is an object with keys K and values V. With union keys it requires all of them: Record<'en' | 'uk', string>. It isn't a Map: Map is a separate data structure with get/set methods.

Further reading

Problem with a question

TypeScript · Junior · question 19

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