Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript remove the last comma from iterate array values

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #259899
    Pranab
    Participant

    Trying to print all the name from members array, all things are fine but the last comma, how do i remove it.

    See the code here please – https://jsfiddle.net/pranab/gLvborup/2/

    please help..and please tell that what other possible way to do that but only in Pure JS, that would be very helpful..

    #259900
    Beverleyh
    Participant

    Google is your friend. Look up “javascript remove last comma” and try a few of the suggestions, such as slice(), substring(), or replace() with a regex

    #259935
    Pranab
    Participant

    got it, thanks.. @Beverleyh

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.