How often have you found yourself tracking down a bug in some code, only to find the error was something simple that should have been avoidable? Maybe you passed the arguments to a function in the wrong order, or perhaps you tried to pass a string instead of a number? JavaScript’s weak typing system and willingness to try to coerce variables into different types can be a source of a whole class of
![Writing Better JavaScript with Flow — SitePoint](https://cdn-ak-scissors.b.st-hatena.com/image/square/0e18fdbc33bafe2355a493dc230a3fac31c0ef63/height=288;version=1;width=512/https%3A%2F%2Fuploads.sitepoint.com%2Fwp-content%2Fuploads%2F2015%2F08%2F1490903635Fotolia_75583105_Subscription_Monthly_M.jpg)