我使用Visual Studio Code,并且我想打印所有数组数据,但是它仅显示... more items消息。有什么办法显示这一切吗?我在stackoverflow上搜索它,但找不到解决方案。
我是用户默认的cmd终端,它与Node.js一起运行
您可能正在尝试将所有元素迭代到一个数组中,然后分别打印。参见下面的代码:
arr = [2, 54, 72, ... ] // your big array
arr.forEach(e => console.log(e))
另请参见https://www.geeksforgeeks.org/node-js-foreach-function/,其中采用了上面的代码