How to handle undefined variables in a function call

function XYZ(var1, var2) { if(var1 === undefined) { var1 = "some default value 1"; } if(var2 === undefined) { var2 = "some default value 2"; } // process... return 0; }

Deals @yubeshop.com