`for(key in obj) BREAK` has an O(N) compexity and not O(1). Is there a way to overcome this

后端 未结 0 1232
傲寒
傲寒 2020-12-03 20:49

The following snippet on my Chrome 87, FF 83 and Node.js 14 gives around 0ms (0.01ms) and 150ms for small and big objects, respectively.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题