I got confused with the argument object of the Node.js function.
Suppose I have the following code:
function x() { return arguments; } console.log(x(1, 2, 3));
In developer chrome tools, it is returned as an array:
[1, 2, 3]
But I got a different result in Node.js:
{ '0': 1, '1': 2, '2': 3 }
How did it happen?
user1725316
source share