This is one of my favorite javascript tricks, because of its effort-to-payoff ratio.

Problem: the default Array.prototype.toString hides any nested structure.

1 [1, 2, 3, 4, 5].toString(); //-> "1, 2, 3, 4, 5"
2 [1, 2, [3, 4], 5].toString(); //-> "1, 2, 3, 4, 5"

Solution: override Array.prototype.toString.

1 Array.prototype.toString = function() {
2     return '[' + this.join(', ') + ']';
3 };
4 
5 [1, 2, 3, 4, 5].toString(); //-> "[1, 2, 3, 4, 5]"
6 [1, 2, [3, 4], 5].toString(); //-> "[1, 2, [3, 4], 5]"