How to show full object in Chrome console?

前端 未结 9 1252
情话喂你
情话喂你 2020-11-28 02:04
var functor=function(){
    //test
}

functor.prop=1;

console.log(functor);

this only show the function part of the functor, cannot show the prope

相关标签:
9条回答
  • 2020-11-28 02:26

    To output obj:

    console.log(obj, null, 4)
    
    0 讨论(0)
  • 2020-11-28 02:34

    You might get even better results if you try:

    console.log(JSON.stringify(obj, null, 4));
    
    0 讨论(0)
  • 2020-11-28 02:39

    You might get better results if you try:

    console.log(JSON.stringify(functor));
    
    0 讨论(0)
提交回复
热议问题