Looking at a test code with linked lists in JavaScript below, the input parameters of the addTwoNumbers()
function are objects. The actual object is shown when I stringified the parameter. Instead, a simple console.log()
shows something that looks like an array but is surely not. The question here is why the simple console.log()
didn't output the actual object as it should, i.e. https://onecompiler.com/javascript/3z5eafms5.
Am I missing something or is it just the platform that reforms the output in some way?