It is possible to display an error if an incorrect parameter has been used, using this code:
for (var key in overrideObj) {
if (params.hasOwnProperty( key)) {
params[key] = overrideObj[key];
} else {
throw new Error("Incorrect param has been used!");
}
}
It is possible to display an error if an incorrect parameter has been used, using this code:
for (var key in overrideObj) { if (params.hasOwnProperty( key)) { params[key] = overrideObj[key]; } else { throw new Error("Incorrect param has been used!"); } }