Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Nesting ternary expressions can make code more difficult to understand.
Source: https://eslint.org/docs/latest/rules/no-nested-ternary
yeep, you're right.. i just wanted to train with singltone and
This solution works perfectly, but I don't believe this degree of complexity was necessary. Also, your implementation means that all repeaters of the same string overwrite each other and are always in-sync. You can also collapse your implementation of getIndex to just 3 lines: const idx = this.dict.get(str) ?? 0; this.dict.set(str, idx + 1); return idx;
in ts same problem..