I wrote an article discussing some techniques from statically typed languages. Head over to SitePoint to check it out!
Here’s what you can expect:
- JavaScript type system, and how it tries to bite you
- Expanding more about the rule of consistent types with more details on using it to reduce bugs
- Dealing with type-checking and type-conversion in a way that doesn’t result in spaghetti and extra checks all over the code