I came across this today, and just want to get more on why and how [].values is a function
$ node -e 'console.log([].values)'
[Function: values]
I came across this today, and just want to get more on why and how [].values is a function
$ node -e 'console.log([].values)'
[Function: values]
Array.prototype.values is a function that your empty array inherits. It's usually called as a method and returns an iterator.