Remove double negation

Remove double negation (!!) expressions.

Remove double negation

Why is this refactoring helpful?

Removing an unnecessary double negation simplifies the code.

What do I need to consider?

Removes conversion to boolean

Double negation changes a value into a boolean. Removing it can lead to a non-boolean value being used in expressions or assignments.

When conversion to boolean is needed, a more straightforward way for converting a value to boolean is Boolean(aCondition).


Related Code Assists

Learn More

Available In