Skip to content

Reduce the number of function arguments #10

@eric-do

Description

@eric-do

model.getAnswers(question_id, count, page, (err, answers) => {

Once you start approaching 3+ function arguments, consider putting them into a singular object instead, and passing that object. That keeps your code more concise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions