I've always noticed this, but never actually understood what's happening here. I have a fairly simple object that I've put in a console.log. It has a seemingly never ending pattern of prototype -> constructor -> prototype -> etc. What exactly is it's purpose?

enter image description here

1 Answer 1


It doesn't have a purpose. As you can see, it only annoys you without giving out any additional information. It only has a reason.

What's happening is that the structure you're printing has a cyclical reference (the prototype knows about the contructor, and the constructor knows about its prototype), and the logger isn't smart enough to realize it will never finish if it naively follows all references.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.