for example:
greetings = ['hey','hi','hello']
Object.keys(greetings) // ["0", "1", "2"]
BUT
keys(greetings) // [0, 1, 2]
You are trying the command line API's keys, which isn't actually part of standard JavaScript. It's something Chromium-based browsers inject in DevTools.
As for why it returns different results, not sure. On the other hand, in JavaScript, indexing with a number is identical to indexing with the string version of that number, so it doesn't really matter.
keys(["a", "b", "c"]) returns [ "0", "1", "2" ]<script> tags etc) shouldn't be able to even access that function.
keys()?Object.keysbut not forkeys. If it's non-standard, we probably shouldn't be guessing what it does.