StrJoin to add items to the end of an ARRAY



Use StrJoin to add items to the end of an array.
Pas2JS pascal source code
var a, b: array of string; c: array [1..2] of string = ['e', 'f']; begin b := ['c', 'd']; Writeln(StrJoin(b, ',')); // c,d a.Add('a', 'b'); Writeln(StrJoin(a, ',')); // a,b Writeln(StrJoin(b, ',')); // c,d a.Add(b, 'e', 'f'); Writeln(StrJoin(a, ',')); // a,b,c,d,e,f b.Clear; a.Add(b, a); Writeln(StrJoin(a, ',')); // a,b,c,d,e,f,a,b,c,d,e,f //--------------------- a.Add(b, c); Writeln(StrJoin(a, ',')); // a,b,c,d,e,f,a,b,c,d,e,f,e,f b.Clear; a.Add(b, []); Writeln(StrJoin(a, ',')); // a,b,c,d,e,f,a,b,c,d,e,f,e,f