It might be more readable to use `Array.join` here:
```
var outFields = options.id + ',' + options.name.join(',');
```