Remove double negation

Remove double negation (!!) expressions.

Cleanup
P42 for VS Code
P42 for GitHub
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 Actions

Learn More

Available In