Because it’s impossible. JavaScript does not have runtime type information, so function overloading (including constructors) cannot be done. Arguments are not part of a function’s signature.
1 Like
Because it’s impossible. JavaScript does not have runtime type information, so function overloading (including constructors) cannot be done. Arguments are not part of a function’s signature.