Course content (12 lessons)
- 4
JavaScript’s dynamic typing makes it incredibly flexible. That flexibility can lead to trouble though. When values have the potential to change types or to end up as null
or undefined
, that can lead to runtime errors in our code or bizarre bugs that take forever to track down because of type coercion. To battle this, we end up with code that is littered will conditionals for null
or undefined
values and type checks, making the core logic harder to read and refactor later.
The Maybe encapsulates the type checking and guards against missing values for us. With Maybe in our toolbelt, we can keep our functions free of all the guardrails, outsource that work to the Maybe and keep our business logic free of all the clutter.
Andy is a full stack JavaScript developer currently working as a UI architect. In his role, Andy is responsible for strategic technology decisions for a portfolio of web applications. He loves learning new libraries, languages and tools and is passionate about sharing what he learns with others.