I read some code where someone did this in Ruby:
puts (\'A\'..\'Z\').to_a.join(\',\')
output:
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O
Take a look at the answer from kannebec for a similar question.
Does JavaScript have a method like "range()" to generate an array based on supplied bounds?
If you don't want to add an own function, but in one line:
var abc =
(function(){var output = []; for(var i='A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++)
output.push(String.fromCharCode(i)); return output;})().join(',');