Skip to content
Advertisement

How to add on last string comma in list?

I have this part of code:

JavaScript

and i get this : 9000;9001 but what i want is 9000;9001; so on last string to add ; also.

Any suggestion?

Advertisement

Answer

I don’t know if you are working with an array or a ArrayList/List.

For an array:

JavaScript

For a ArrayList/List:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement