B2D1

Results 5 comments of B2D1

```javascript const data = [{ id: '1', name: 'test1', children: [ { id: '11', name: 'test11', children: [ { id: '111', name: 'test111' }, { id: '112', name: 'test112' }...

```javascript const rotate = (arr, step) => { let len = arr.length; return arr.reduce((acc, v, i) => { return i + step >= len ? ((acc[i + step - len]...

```javascript const curry = fn => { const len = fn.length; return function curried(...args) { if (args.length === len) { return fn.apply(null, args); } return (..._args) => { return curried.apply(null,...

感谢您的建议😊,这几天实践一下项目优化

> 我先使用了db.getCollection('users').dropIndexes(),然后在UserService中的addUser方法中先User.findOne({ usr }),判断是否存在相同用户名用户,然确定是否可以添加新用户 先删除 todo 数据库:db.dropDatabase() 再重启 MongoDB 服务