How to write to a variable in a for loop like this
var playlist = [ { author:"", title:audio[i].trackname, discription: "", mp3:'https://site.ru/music/'+audio[i].url, oga:"" }, ];
In the playlist variable must be inserted from the loop:
{ author:"", title:audio[i].trackname, discription: "", mp3:'https://site.ru/music/'+audio[i].url, oga:"" }, var i; for(i=0;i<audio.length;i++) { console.log(audio[i]); }
How to do it right?