3 ms·
>I can’t tell you how many times I see “can’t call function toLowerCase of undefined”, etc. Think that should be addressed by optional chaining now.
by factormeta 4y ago
>I can’t tell you how many times I see “can’t call function toLowerCase of undefined”, etc.
Think that should be addressed by optional chaining now.
- Osiris 4y agoPartly but optional chaining doesn't make sure that the function actually exists on the target. So if "const a = 10" and you call "a?.toLowerCase()" you'll still get an error.