But then a funny thing happened, people started using it more and more, and for ever more ambitious purposes. Then Microsoft invented the XmlHttpRequest object (2001) that allowed pages to communicate with the server in the background, and the world was never the same. By about 2005 it was available in most major browsers, and we had apps like gmail to show just what was possible with it.
But I see stuff when I console.log!!!
Yeah, about that. You see, the behavior of the console here is explicitly implementation-defined in the standard. So
console.log an object.
Contrast this with the behavior of
print in the reference implementation of Python: it very clearly spells out that objects get run through the
str function which calls the object's
__str__ magic method if present and delegates to
repr if one is not found.
However it's worth noting here that Python (as far as I know) does not actually have a formal standard, and the behavior of the CPython reference implementation is not binding on alternative implementations, although I've never used it I would not be at all surprised if e.g. Jython did something quite different.