4 ms·
This is not true. I think you're confusing JS objects with Maps. This will just coalesce the key to string and overwrite one element of the object with the othe
by thegeomaster 3y ago
This is not true. I think you're confusing JS objects with Maps. This will just coalesce the key to string and overwrite one element of the object with the other.
With a map it works like you described:
objects = new Map()
items1 = ["a", "b"]
items2 = ["a", "b"]
objects.set(items1, 1)
objects.set(items2, 2)