mekefly

Results 1 comments of mekefly

> > 另外我感觉Set应该用Map实现比较好吧 > > 使用map的话,js的对象在遍历时是无序的,Set的规范里要求要按add的顺序来遍历 可以实现,你如果打印一下就会发现set的顺序会map的顺序是一样的 我刚写了一个可以看仓库https://github.com/mekefly/MySet 源码文件在这里https://github.com/mekefly/MySet/blob/main/src/index.ts