So yeah, maybe we do need this new operator, although I really am worried about handling probably-invalid data structures. I mean, isn't that an indicator we should probably write our code a different way? Maybe we should, for example, use another function to handle that specific input, which should be checked before that? I don't know, just speculating.
yes, like I said model your data right and things get more robust.
The promis catching is nice and I prefer it, but sometimes await is nicer in a specific case and you have to try-catch, I guess ?. would be simpler then.
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.
I mean, we could also do this (to get rid of the IIFE), but that's unfunctional, and I don't wanna use a
let
tbh.Another option would probably be this, but ew, async where we don't need it...
So yeah, maybe we do need this new operator, although I really am worried about handling probably-invalid data structures. I mean, isn't that an indicator we should probably write our code a different way? Maybe we should, for example, use another function to handle that specific input, which should be checked before that? I don't know, just speculating.
yes, like I said model your data right and things get more robust.
The promis catching is nice and I prefer it, but sometimes await is nicer in a specific case and you have to try-catch, I guess ?. would be simpler then.