Can we find the area of cuboid using the area function polymorphism concept

when i passed 3 or more values in the function area created in the video , the output in the console was still showing the area of rectangle , so that means we can only achieve polymorphism of a certain kind ?