How To Write Safe JavaScript and Avoid Mid-Function Returns

Presume the positive while still catching the catastrophes

Nevin Katz
Better Programming
Published in
3 min readJul 22, 2021

--

Photo by Joan Gamell on Unsplash

Suppose you are writing a JavaScript program that accepts data from elsewhere — and you want to make it bullet-proof. To make this program work, you must write a particular function that takes an object for an argument. The type of object it accepts has deeply nested…

--

--

Developer at EDC. I write about web development and biology. Subscribe at https://buttondown.email/nevkatz for article roundups.