function rectangularPrismVolume(width, depth, height) {
if (width === undefined) {
// Bunun olmaması lazım :D
// Olabilir de. Tercihinize göre bir şey yaparsınız.
throw new Error("En azından genişliğini bilelim...");
}
if (depth === undefined) {
return rectangularPrismVolume(width, width, height);
}
if (height === undefined) {
return rectangularPrismVolume(width, width, 1);
}
return width * depth * height;
}