0

I have a function that returns an array of values. When I use console.log(myFunction(arguments)), the following array is returned:

[
  'B1', 'C1', 'D1', 'E1', 'F1',
  'G1', 'H1', 'B2', 'C2', 'D2',
  'E2', 'F2', 'G2', 'H2', 'B3',
  'C3', 'D3', 'E3', 'F3', 'G3',
  'H3', 'B4', 'C4', 'D4', 'E4',
  'F4', 'G4', 'H4', 'B5', 'C5',
  'D5', 'E5', 'F5', 'G5', 'H5'
]

There are 5 columns. I want to display an array of 7 columns. How can I do it?

7
  • Which console are you looking at? Mine doesn't format arrays with columns at all. Commented Jul 4, 2022 at 19:29
  • @Bergi Powershell (embedded in VS code) Commented Jul 4, 2022 at 19:30
  • You mean with node.js? Commented Jul 4, 2022 at 19:31
  • @Bergi yep, I mean with node.js Commented Jul 4, 2022 at 19:31
  • Call util.inspect directly and pass the breakLength option Commented Jul 4, 2022 at 19:34

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.