var m = null; try { console.log(m.hasOwnProperty(‘a’)); }catch(error) { console.log(require(‘util’).inspect(error)); }
上面代码如何判断error是什么类型?怎么知道error有哪些属性和方法?
console.dir(error);
console这个对象在哪查啊,node.js文档里怎么没有
@zhoutaobj 有的。 enter link description here
CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。
console这个对象在哪查啊,node.js文档里怎么没有
@zhoutaobj 有的。 enter link description here