one thing to note:
for (key in obj) // do
It’s better to use the first method below (when initializing): obj = Object.create(null)
obj = {}
So you don’t inherit random keys from the chain, unless you intend to. Or use: Object.keys(obj).forEach(k
Which doesn’t have this issue like the for-in loop version does.