Consider the following function:
function interpolate(color1, color2, progress) {};
All arguments must be passed, color1 and color2 must be an instance of my color object and progress must be a number.
Is it faster to check the types or simply wrap a try/catch block round the logic and see if it fails?
If it does fail then I could check that all arguments are present and correct and throw a descriptive expection.