If you are unable to (as [@][1][Falco][1] commented, and answered answered,) change your "Property"^ names - you could also use a look-up table concept (implemented as a dictionary object):
var params = {
"sEmail" : "Email",
"sPhone" : "Phone",
"sBirthDate" : "BDay"
};
^ Note: As [@][1][Falco][1] implied, these are more correctly 'parameters' or arguments, than properties.
This makes it far more maintainable than a page of if-else blocks. [1]: http://codereview.stackexchange.com/users/46500/falco https://codereview.stackexchange.com/users/46500/falco
If you are unable to (as [@][1][Falco][1] commented, and answered,) change your "Property"^ names - you could also use a look-up table concept (implemented as a dictionary object):
var params = {
"sEmail" : "Email",
"sPhone" : "Phone",
"sBirthDate" : "BDay"
};
^ Note: As [@][1][Falco][1] implied, these are more correctly 'parameters' or arguments, than properties.
This makes it far more maintainable than a page of if-else blocks. [1]: http://codereview.stackexchange.com/users/46500/falco
If you are unable to (as [@][1][Falco][1] commented, and answered,) change your "Property"^ names - you could also use a look-up table concept (implemented as a dictionary object):
var params = {
"sEmail" : "Email",
"sPhone" : "Phone",
"sBirthDate" : "BDay"
};
^ Note: As [@][1][Falco][1] implied, these are more correctly 'parameters' or arguments, than properties.
This makes it far more maintainable than a page of if-else blocks. [1]: https://codereview.stackexchange.com/users/46500/falco
If you are unable to (as [@][1][Falco][1] commented, and answered,) change your "Property"^ names - you could also use a look-up table concept (implemented as a dictionary object):
var params = {
"sEmail" : "Email",
"sPhone" : "Phone",
"sBirthDate" : "BDay"
};
^ Note: As [@][1][Falco][1] implied, these are more correctly 'parameters' or arguments, than properties.
This makes it far more maintainable than a page of if-else blocks. [1]: http://codereview.stackexchange.com/users/46500/falco