Initialize dynamic arrays in SmartMS

Top 

Example code : Initialize dynamic arrays in SmartMS

procedure TForm1.W3Button2Click(Sender: TObject);

 var dynamicArray  : array of String;

     dynamicArray1 : array of String = ['one''two''three'];

begin

  dynamicArray := ['one''two''three'];

end;

 

JS output:

function W3Button2Click(Self, Sender$5) {

      var dynamicArray$1 = [];

      var dynamicArray1 = [];

      var dynamicArray1 = ["one","two","three"].slice();

      dynamicArray$1 = ["one","two","three"].slice();

   }