What does 3 dots mean in typescript?

The three dots are known as the spread operator from Typescript (also from ES7). The spread operator return all elements of an array. Like you would write each element separately: let myArr = [1, 2, 3]; return [1, 2, 3]; //is the same as: return […myArr];

Sizin İçin Seçtik  What is spread operator in angular?

Leave a Reply

Your email address will not be published. Required fields are marked *

What does 3 dots mean in typescript?

The three dots are known as the spread operator from Typescript (also from ES7). The spread operator return all elements of an array. Like you would write each element separately: let myArr = [1, 2, 3]; return [1, 2, 3]; //is the same as: return […myArr];

Sizin İçin Seçtik  When would you use rest parameters in TypeScript?

Leave a Reply

Your email address will not be published. Required fields are marked *