Array.joinwith()

Revision as of 06:15, 30 April 2020 by Swapna (talk | contribs) (Created page with "By use of this command, each element from an original array is joined with the element specified in the argument. The new element is joined in-between the start and end of ori...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

By use of this command, each element from an original array is joined with the element specified in the argument. The new element is joined in-between the start and end of original array.


Examples

1.

a=1,3,4,3,5,7,9;
a.joinwith(["join"])

-->Displays output as 1 join 3 join 4 join 3 join 5 join 7 join 9

2.

a=MS(3);
a.joinwith(["$$$"])

-->Displays output as 2$$7$$6$$9$$5$$1$$4$$3$$8


See Also