js array tostring

js array tostring

Hello, I like the nifty behavior in js where toString() on an array converts the array into a csv. However, the csv is created without spaces after the commas. For example:

var accounts = [];
accounts.push(123);
accounts.push(456);
var myAccounts = accounts.toString() //writes out 123,456

Sometimes I want to display this csv to the user so proper formatting would have a space after the commas. What is the easiest and most elegant way to put a space after the commas in a csv like this?