To quickly write an array, you can do this:
var x = 'foo bar baz'.split(' ');
Especially for large arrays it is a little easier to print than:
var x = ['foo', 'bar', 'baz'];
Although, obviously, using .split() much less significant than just writing the entire array.
source share