0

In typescript you can specify an array of numbers type as either number[] or Array<number>. Is there a difference or reason to choose one over the other?

1

1 Answer 1

2

Is there a difference or reason to choose one over the other?

No. number[] is just a shorthand.

Origin

This is because TS the very original versions, didn't have generics so a special syntax for arrays was created.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.