i want to pass an argument to a method named checkMessages. checkMessages method is called in two places one call it with 1 argument and the other calls it with 2 arguments.

below is the code,

```
const checkMessages = (messages, isActive) => {
    cy.logout();
    changeUser(someuser);

    if (isActive) {
        cy.getByTestId('toggle').click();
        messages.forEach(message =>
            cy.get('textarea[id="description"]').type(message)
        );
    }

    messages.forEach(message =>
        cy.getTableRow('Description', message)
    );
}

checkMessages([
    `some message ${item1.name}were added`,
    `some message ${item2.name} were added`,
]); // one method call with one argument

checkMessages([
    `some message ${item1.name}were added`,
], isActive=true); // second method call with two arguments
//error with this function call

```

Now the problem is when the checkMessages method is called with 2 arguments call it throws error "isActive is not defined"

how do i pass this argument to checkMessages method. how should the function call be with this argument.

could someone help me with this. thanks.