Clean JavaScript - Utilities

There are many different methods of creating clean Javascript. This post is just a simple way that I prefer to do it.

This is a Sac Rate Calculator that I wrote in JavaScript:

Simply, I am creating a namespace and definition then defining a self-calling function. Within this self-calling function I am defining the method for calculating the SAC rate as basically a static method.

Now you can use some sort of JQuery to pass parameters in:

Happy Coding