In Python I can override __str__ method of a class, so str(class_instance) would return what method __str__ of such class returns.
Is there any analog way in javascript to define what String(classInstance) returns?
In Python I can override __str__ method of a class, so str(class_instance) would return what method __str__ of such class returns.
Is there any analog way in javascript to define what String(classInstance) returns?