The traditional way would be to collect the strings into a string buffer, and manually add the comma:
var buffer = StringBuffer();
String separator = ""; // Avoid leading comma.
for (var data in userData) {
buffer..write(separator)..write(data["location"]);
separator = ",";
}
var loc = buffer.toString();
Another approach is to collect the values into a list and then use the join method:
var loc = [for (var data in userData) data["location"]].join(",");
That's probably more convenient in most cases, except when you need to do fancy computation on each element.
I have avoided using the for(;;) loop since you don't actually use the index for anything except accessing the user data. Then it's better to just for/in over the list elements directly.