When I console.log()
an object in my JavaScript program, I just see the output [object Object]
, which is not very helpful in figuring out what object (or even what type of object) it is.
In C# I'm used to overriding ToString()
to be able to customize the debugger representation of an object. Is there anything similar I can do in JavaScript?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…