I'm trying to create a function with optional parameters.
function RetvinkletTrekant(par1, par2, par3, par4, par5, par6){
if (par1) {var a = par1}
if (par2) {var b = par2}
if (par3) {var c = par3}
if (par4) {var A = par4}
if (par5) {var B = par5}
if (par6) {var C = par6}
document.write(A);
}
RetvinkletTrekant(null, null, null, 4, null, null);
Thanks in advance.