var values = [];
for(var i = 0, l = value.length; i < l; i++) {
values.push(i + ':' + value[i]);
}
// or if you actually have an object:
for(var id in value) {
if(value.hasOwnProperty(id)) {
values.push(id + ':' + value[id]);
}
}
var blkstr = values.join(', ');
var arr = ['a', 'b', 'c', 1, 2, '3'];
// using toString method
var rslt = arr.toString();
console.log(rslt);
// using join method. With a separator '-'
rslt = arr.join('-');
console.log(rslt);
// using join method. without a separator
rslt = arr.join('');
console.log(rslt);