I have a Javascript array:
animals = [
["cats", "dogs"],
["verrylongcat", "dog"],
["shortcat", "verrylongdog"],
["cat", "dog"]
]
And I would like to display it nicely in the console. Is there an easy way to make the colums a fixed width so I get something like this:
cats || dogs
verrylongcat || dog
shortcat || verrylongdog
cat || dog
animals is just an example, my array could also have 3, or 4 columns or even more.
BTW - I'm shocked this question hasn't been asked, but I've looked everywhere and I can't find it. I'm basically asking the same question as this question but for JavaScript / JS.