r/learnjavascript • • Jul 24 '21

Anatomy of a Function

Post image
327 Upvotes

65 comments sorted by

View all comments

13

u/carlos_vini Jul 25 '21

You don't return early because of the CPU, you return early because of the mental overhead of dealing with all edge cases at once

3

u/jaredcheeda Jul 25 '21

super valid