On string concatenation of ES6

first of all, the interface looks like this:

clipboard.png

uses a frame and returns the selected id, array format.

but the string format is required in the background, and it is too troublesome to convert it with js, so ES6

is used here.
var iab2_result = `${this.iab2_1},${this.iab2_2},${this.iab2_3},${this.iab2_4},${this.iab2_5},${this.iab2_6}`

as shown above, the converted data is normal, as follows:

"2,3,69,71,144,145,225,224,222,339,213,210"

but you can choose at least one of this multi-check box. If the user chooses a data, that"s it

"2,,,,,,"

it must be bad to have so many commas. Is there any way to improve it?


let checklist= [];
checklist.push(this.iab2_1) //
let iab2_result  = checklist.join(',');

  

str.replace (/ (,) (?!\ w) / gjinger')

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be9661-3196d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be9661-3196d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?