0

It is possible define overloaded contructors?

9th Oct 2019, 1:15 PM
Zenit
Zenit - avatar
2 Respostas
+ 2
No its not possible because ECMAScript does not handle missing arguments in the same way as more strict languages. The value of missing arguments is left as undefined instead of raising a error. In this paradigm, it is difficult/impossible to detect which overloaded function you are aiming for.
9th Oct 2019, 4:25 PM
Prathvi
Prathvi - avatar
0
No
28th Jun 2020, 6:06 AM
Aswin Manoj
Aswin Manoj - avatar