Sara T 9900699d0b Fix equality expression in ternary operator (#34225)
The equality comparison expression (==) should be used instead of assignment (=)
2018-11-06 21:44:51 -05:00

286 B

title
title
Use the Conditional (Ternary) Operator

Use the Conditional (Ternary) Operator

Hint 1

Use ternary operator to check for equality.

Warning Solution Ahead!!!

function checkEqual(a, b) {
  return (a == b ? true : false );
}

checkEqual(1, 2);