js中console.log()和console.dir()的区别
console.log()会在浏览器控制台打印出信息
console.logprints the element in an HTML-like tree
console.dir()可以显示一个对象的所有属性和方法
console.dirprints the element in a JSON-like tree
console.log()会在浏览器控制台打印出信息
console.log prints the element in an HTML-like treeconsole.dir()可以显示一个对象的所有属性和方法
console.dir prints the element in a JSON-like tree