Just dropping my 2 cents, the possible undefined problem of the aforementioned record can be solved by an explicit cast in the value lookup, it's just that both the object and its key need to be casted.
Hey @bwca !
Thank you for sharing your approach to solving the problem!
I believe it's challenging to assess it solely based on this small code snippet. In real projects, everything can be significantly different 🥲
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Just dropping my 2 cents, the possible
undefined
problem of the aforementioned record can be solved by an explicit cast in the value lookup, it's just that both the object and its key need to be casted.Though the case seems rather artificial, as you'd probably be using
.values
or.entries
:PHey @bwca !
Thank you for sharing your approach to solving the problem!
I believe it's challenging to assess it solely based on this small code snippet. In real projects, everything can be significantly different 🥲