mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-19 00:02:27 -05:00
Fix equality expression in ternary operator (#34225)
The equality comparison expression (==) should be used instead of assignment (=)
This commit is contained in:
@@ -10,7 +10,7 @@ Use ternary operator to check for equality.
|
||||
|
||||
```javascript
|
||||
function checkEqual(a, b) {
|
||||
return (a = b ? true : false );
|
||||
return (a == b ? true : false );
|
||||
}
|
||||
|
||||
checkEqual(1, 2);
|
||||
|
||||
Reference in New Issue
Block a user