A foreach?
var errorText = "";
response.errors.forEach(function(element) {
errorText += element.reason;
});
Edit: Some clarification.
A foreach is better than a for loop especially because JavaScript does not enforce contiguous elements.
Assuming your array is as such: {1, 2, 3, undefined, 4, 5, 6, undefined, 7}
A for loop would obviously iterate including the undefined values, where a forEach would not.
Note, if you're working with an object instead of an array, a forEach will not work. You will instead need:
var errorText = "";
Object.keys(response.errors).forEach(function(key) {
errorText += response.errors[key];
});
This is much better than for or for ... in when working with Objects. however in this case I'm assuming it's an array, but I can't know for sure without more info.