본문 바로가기
IT/web

Node.js] console.log // dir // table ..

by 깻잎쌈 2020. 1. 25.
반응형
var person ={name:"ttt", age:321};

console.log(person);
console.dir(person);

console.log(person.name);
console.dir(person.name);

console.log(person.age);
console.dir(person.age);

console.table(person)

 

dir()은 객체의 속성을 확인할 때 사용한다는데 차이점이 왜 안보이지;

 


 

What's the difference between console.dir and console.log?

In Chrome the console object defines two methods that seem to do the same thing: console.log(...) console.dir(...) I read somewhere online that dir takes a copy of the object before logging it, w...

stackoverflow.com


 

console.dir() vs console.log() | Treehouse Community

Participate in discussions with other Treehouse members and learn.

teamtreehouse.com

 

 

반응형

댓글