DEV Community

loading...

Discussion on: What was your win this week?

Collapse
daniguardiola profile image
Dani Guardiola_

That's a smart hack! Of course, typescript takes care of this, but if you're using plain JavaScript and don't care about anything other that the argument not being undefined, this is a clever solution!

If you're already type-checking then you don't need this though. So it depends on the specific case.

Anyway, nice! I'll drop u a follow.

Collapse
skaytech profile image
skaytech

True that! Thanks for your note & the follow.

Forem Open with the Forem app