Using StrSplit and StrJoin
Example code : Using StrSplit and StrJoin Pas2JS
procedure TForm1.W3Button2Click(Sender: TObject);
begin
var myDynArr := StrSplit('jan,feb,mar', ',');
for var i := myDynArr.Low to myDynArr.High do
WriteLn(myDynArr[i]);
WriteLn( StrJoin(myDynArr, ',') ); // jan,feb,mar
end;
Result:
---------------
jan
feb
mar
jan,feb,mar
----------------