How to overload constructor of an Object in JS (Javascript)?

You can’t do that, since JavaScript is not a strongly typed language it will not see a difference between form and userName. You can create multiple function like createUserFromForm(form) and createUserFromUserInfo(userName, password,...) or you could try to use a singular constructor with no arguments specified and then use arguments collection to check the input and decide what to do.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)