2 ms·
That is what I thought, and if path = ['foo','bar'] and payload = 2, it makes {'foo,bar',2}. It is for sure making max use of dynamic programming. Typescript
by jcampbell1 7y ago
That is what I thought, and if path = ['foo','bar'] and payload = 2, it makes {'foo,bar',2}.
It is for sure making max use of dynamic programming. Typescript accepts it as {[path as any]: payload} which is pulling ejection lever on typescript.
Glad I learned something new from this.
- PudgePacket 7y agoIt's just a nice quality of life improvement compared to const obj = {}; obj[foo] = 10;