Skip to main content
Code Review

Return to Answer

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

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

Source Link
Tersosauros
  • 944
  • 6
  • 16

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

default

AltStyle によって変換されたページ (->オリジナル) /