I iterate over an object and I want to bind a service name. This is my code:
var servizi;
for(var i = 0; i < appointment.id_services.length; i++)
{
servizi += appointment.id_services[i].name + " ";
}
Now the problem is that I got this result:
undefined hair cutting
My object has only hair and cut, why am I also getting undefined?
source
share