Skip to content

Code optimization: accept objects as function parameters #99

Open
@rahulbhanushali

Description

@rahulbhanushali

Its really difficult to pass parameters to the functions as the parameters are defined individually.

For example the method search has 6 to 7 parameters and I want to only pass the first and 6th parameter then I will have to pass

search(param1, undefined, undefined, undefined, undefined, undefined, param6);

These is really very inconvenient as one will have to pass unecessary parameters with value undefined.

Using objects here would be very handy as one could simple code its something like as follows

var params = {
param1: value,
param6: value
};
search(params);

The code is short and readable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions