How to recover the elements of a foreach for reformed in this way:
['julie','nicola','sahra']
My code
var outPutStats = ''
client.data.forEach(function(element) {
outPutStats += [element.name];
});
.............................
.............................
xAxis: {
name: [outPutStats] // Must be ['dataName1','dataName2']
},
yAxis: {
title: {
text: null
}
},
outPutStatsto be an array or a string?client.torrents[0].name['julie','nicola','sahra']outPutStatsto be like this:['julie','nicola','sahra']or like this"['julie','nicola','sahra']"?