阻止Node.js重新打印输出 [英] Prevent Node.js repl from printing output

查看:107
本文介绍了阻止Node.js重新打印输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果某些javascript计算的结果是10,000个元素的数组,则Node.js repl将其打印出来。我如何阻止它这样做?

If the result of some javascript calculation is an array of 10,000 elements, the Node.js repl prints this out. How do I prevent it from doing so?

谢谢

推荐答案

你为什么不追加; null; 到你的表达式?

Why don't you just append ; null; to your expression?

new Array(10000); null;

打印

null

甚至更短,使用; 0;

这篇关于阻止Node.js重新打印输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆