I created a function like this:
function saveItem(andClose = false) { }
It works fine in Firefox
In IE it gives this error on the
In your case, you have an other alternative to be sure that your variable is a boolean:
function saveItem(andClose) { var andClose = true == andClose; // ... }
Default value is undefined, and true == undefined => false, so your default value will be false :)
undefined
true == undefined
false