I\'m iterating over an object and I want to concatenate the name of the service. This is my code:
var servizi; for(var i = 0; i < appointment.id_services
You get undefined because you declared an uninitialized variable, and then added to it (twice).
Initialize the declared variable as an empty string first
var servizi = "";
intialize variable to empty string