true story...
const object1 = { a: 'somestring', b: 42, c: false, [Symbol('ghost')]: '👻' }; console.log(Object.values(object1).length); //>3
I'm getting 3 for the length of both keys and values. The arrays are ["a", "b", "c"] and ["somestring", 42, false], respectively.
3
length
keys
values
["a", "b", "c"]
["somestring", 42, false]
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
true story...
I'm getting
3
for thelength
of bothkeys
andvalues
. The arrays are["a", "b", "c"]
and["somestring", 42, false]
, respectively.