---
title: Avoid Assignments In Operands
description: "Impact Area Manageability Severity Medium Affected Element Lightning ## Rule ID **SF-0060** ## Impact Assignments in operands make code more complicated and harder to read. Also it can be a signal of a poorly-defined equality operator (assignment operator ‘`=`’ was…"
url: "https://community-staging.qualityclouds.com/qcdocs/qc/pmd-rules/avoid-assignments-in-operands/"
updated: "2025-03-21"
category: PMD Rules
---

# Avoid Assignments In Operands

Impact Area

Manageability

           Severity

Medium

           Affected Element

Lightning

## Rule ID

**SF-0060**

## Impact

Assignments in operands make code more complicated and harder to read. Also it can be a signal of a poorly-defined equality operator (assignment operator ‘`=`’ was used instead of the equality operator ‘`==`’.””) which will produce unwanted results.

## Remediation

This is sometime indicative of the bug where the assignment operator ‘=’ was used instead of the equality operator ‘`==`’.””

### Time to fix

30 min

## References

See the PMD documentation article: [AssignmentInOperand](https://pmd.github.io/latest/pmd_rules_ecmascript_codestyle.html#assignmentinoperand).
