Answers for "dart have array"

3

dart have array

import 'dart:convert';
void main() { 
   var arr = new List(5);// creates an empty array of length 5
   // assigning values to all the indices
   arr[0] = 'a'; 
   arr[1] = 'b'; 
   arr[2] = 'c'; 
   arr[3] = 'd'; 
   arr[4] = 'e';  
   print(arr); 
}
Posted by: Guest on March-26-2020

Code answers related to "Dart"

Browse Popular Code Answers by Language