Test Var Undefined and default value for argument
if (typeof variable ==='undefined') {
// your code
}
// the following function has the last 2 arguments nont mandatory
function bymanHeightEqual(pElementMain, pElementCompare, pHeight, pHeightPlus ) {
// default value for arguments not mandatory
pHeight=pHeight || "higher";
pHeightPlus=pHeightPlus || 0 ;