Question · Cours Angular · Module 1: Introduction à Angular
Type tableau en TypeScript
Comment déclare-t-on correctement un tableau de chaînes de caractères en TypeScript ?
Réponses possibles
- const list: string = [];
- const list: string[] = [];
- const list: [string] = ();
- const list = string<[]>;
Afficher la réponse
Bonne réponse :
- const list: string[] = [];