Fix equality expression in ternary operator (#34225)

The equality comparison expression (==) should be used instead of assignment (=)
This commit is contained in:
Sara T
2018-11-06 20:44:51 -06:00
committed by Paul Gamble
parent d1c5f51792
commit 9900699d0b

View File

@ -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);