Fix equality expression in ternary operator (#34225)

The equality comparison expression (==) should be used instead of assignment (=)
pull/34243/head
Sara T 2018-11-06 20:44:51 -06:00 committed by Paul Gamble
parent d1c5f51792
commit 9900699d0b
1 changed files with 1 additions and 1 deletions

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