I’m writing a javascript function that has a pretty long list of parameters:
FormatGrid(ID, BackColor, SideColor, HiddenColor, SmallTextClass....)
It works well but it’s getting somewhat painful when calling this function to remember each parameter and the order they go in because the function takes a total of 9 parameters (and I might add 2 more).
I’m wondering if there’s an elegant solution to this.
Thanks for your suggestions.
you can just pass in an Object
Where your myObject is something like
{ID: '1', BackColor: 'red', SideColor: 'red', HiddenColor: 'black', SmallTextClass: 'true'...}